PDA

View Full Version : Execute things onece after HardReset, clean HKLM/Init


baniaczek
30th March 2008, 04:15 AM
Only for advanced users and ROM cookers. Don't use if you are not sure, what can happen

The main goal to develop HKLM_Init_Clean was to create the tool, which can remove some entries from HKLM/Init in a safe way. For example to remove coldinit.exe (which is required only after the first reboot), and maintain DependXX chain.
By the way, HKLM_Init_Clean checks validity of all entries inside HKLM/Init and cleans errors. It removes LanuchXX entries if they are associated with non existing files, removes DependXX entries if there is no corresponding LaunchXX entry, removes entries from all DependXX, if the associated LaunchXX doesn't exist.

First of all - backup your HKLM/Init.

example:
HKLM/Init:Launch99="blahblah.exe"
HKLM/Init:Depend100=hex:14,00 ;Let's assume, that there is no Launch100
HKLM/Init:Depend101=hex:63,00 ;hex 63 == dec 99
HKLM/Init:Launch102="xx.exe" ;Let's assume, that there is file \windows\xx.exe
HKLM/Init:Depend102=hex:14,00,63,00 ;Let's assume, that there is valid Launch20 entry (hex 14==dec 20), and there is no valid Launch99 entry (hex 63 == dec 99)
Things, that should be removed are:
HKLM/Init:Launch99
HKLM/Init:Depend101
and entry 63,00 from HKLM/Init:Depend102

Simply execute HKLM_Init_Clean.exe and compare new HKLM/Init and the original one. Probably you will be surprised.

To remove things from HKLM/Init after reboot:

Put HKLM_Init_Clean.exe into \windows folder
Add something like Launch120="HKLM_Init_Clean.exe". The number have to be greater than removed entry.
Add something like Depend120=hex:15,00 Of course - numbers in LaunchXX and DependXX (in the example: 120) have to be the same. It's good idea to use HKLM_Init_Clean.exe as the last LaunchXX entry
Set Depend120 entries to the numbers of deleted things. One WORD per entry, low byte first. In the example (Depend120"=hex:15,00) (hex 15==dec 21) Launch21 will be removed after the next reboot. You can use as many entries, as you wish - all of them will be removed. Remember - they are WORDs (two bytes), low byte first.
Soft reset.
Verify results.
If everything looks good - you are ready to add HKLM_Init_Clean to the kitchen.


HKLM_Init_Clean is safe for dependency chains.
For example. After:
Launch1="something1.exe"
Launch2="something2.exe"
Launch3="something3.exe"
Launch120"="HKLM_Init_Clean.exe"
Depend2=hex:01,00
Depend3=hex:02,00
Depend120=hex:02,00
You will get:
Launch1="something1.exe"
Launch3="something3.exe"
Depend3=hex:01,00
Launch3 depends on removed Launch2, which depends on Lauch1, so after removing Launch2 - Launch3 depends on Launch1

Inside attached archive:

HKLM_Init_Clean.exe - this app
HKLM_Init_Clean.cpp - source (ugly and dirty)
HKLM_Init_Clean_sample.reg - sample reg file
HKLM_Init_Launcher.exe - exactly the same as InitLauncher (see http://forum.xda-developers.com/showthread.php?t=302013)

All executables are not signed, not UPXed, not converted into modules - do it yourself.

utak3r
30th March 2008, 04:48 PM
Ha, great tool, now we can make it really easy :) Thanks for that, bro!

Now... off to testing :D

terranhms
15th January 2009, 08:58 PM
Hey Guys, sorry for my english, I changed the HKLM/Init:Launch50="YFLoader.exe"
to the
HKLM/Init:Launch99="explorer.exe"

Then My PNA worked As Windows CE 4.2,,,
But Of course i didnt hold myself, and i deleted exlorer.exe file from the PNA,
So When i open my PNA,THERE IS NOTHING. Because of the absence of explorer.exe, i cant copy it back,because i lost the connection between computer and PNA..... OHH MY GODNESS...

MY QUESTION : HOW TO TURN IT TO NORMAL, I CANT CONTACT IT WITH ACTIVESYNC, OR HOW I CAN MAKE MY PNA START ON MEMORY CARD, TO I TURN EVERYTHING TO NORMAL...

PLEASE REPLY ME, I WAIT NEAR COMPUTER WITH REAL STRESS

THANKS..

soringheo
7th November 2009, 10:46 AM
I have a PNA with Win CE5; I modified the register and now I can not connect my PNA to PC and card...
If it exists a program to connect to my PNA please write to me. Or if it is a possibility to change the register from my PNA.

i have the architecture of the good regitry.

I am waiting for your answere.

Please help me!

tsalta
7th November 2009, 05:58 PM
Is a bit FUN the GUY wrote you : Only for advanced users and ROM cookers. Don't use if you are not sure, what can happen

But nobody Listen:) I don`t think im so advanced user and for this reason will nost test it.

selyb
8th November 2009, 03:38 AM
IMO, this would be a great thing to run at the end of UC :-D

I would think someone could accomplish the same thing with a mortscript or AHK script though.