Jump to content











Photo
- - - - -

How to add registry entries into PE environment


  • Please log in to reply
3 replies to this topic

#1 Moon Goon

Moon Goon

    Frequent Member

  • Advanced user
  • 270 posts

Posted 21 September 2006 - 12:36 PM

How does one add registry entries into a WinBuilder PE disc?

I need to add some registry changes needed to run FoxitPDF in the PE environment. Well, they aren't *needed* but would be useful for registering Foxit as the default .PDF reader and optionally removing the ads.

If all else fails I could use a launch program to add the registry changes and execute Foxit but that seems less clean to me.

I've done a search and also am in the process of looking through other peoples scripts but any clues would *really* be helpful!

#2 Brito

Brito

    Platinum Member

  • .script developer
  • 10616 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 21 September 2006 - 01:01 PM

Take a look on cmd.script from %BaseDir%\Archive\Shell, you'll see something like:

[process]
echo,"Loading setup registry hive.."
RegHiveLoad,"Build","%targetdir%\i386\system32\setupreg.hiv"
echo,"Writing new value.."
RegWrite,HKLM,0x1,"Build\Setup","CmdLine","cmd.exe"
echo,"Unloading hive.."
RegHiveUnLoad,"Build"
echo,"All done"


RegHiveLoad - First you need to load your hive into the local windows registry, this command uses the same API used by "reg.exe /load"

RegWrite - Then you use regwrite to add your data, since you can write anywhere in the registry you'll need to ensure that the correct path to your loaded hive is used.

RegHiveUnLoad - Finished adding data? Unload the hive from your local windows registry.


These commands are explained in more detail inside this section of our local wiki:
http://boot-land.net...?title=Registry

Hope this helps! :P

#3 Moon Goon

Moon Goon

    Frequent Member

  • Advanced user
  • 270 posts

Posted 21 September 2006 - 03:43 PM

Thanks for the reply Nuno! I think that tells me what I need to know. Do scripts for the standard project expect that the setupreg.hiv is already open?

#4 Brito

Brito

    Platinum Member

  • .script developer
  • 10616 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 21 September 2006 - 04:09 PM

Do scripts for the standard project expect that the setupreg.hiv is already open?


No, each script is independent from each other.

Paraglider suggested some time ago to load all hives on the beginning of the process, and unload them before creating the ISO (a bit like bart's PE builder or winPE) - this would allow to write keys in these PE hives a bit faster, but for the moment it is prefered that each script load and unload hives as needed.

I guess the main issue is that each project is developed to ensure that any script can be tested individually, using a common hive load script would also mean more time wasted on script processing when doing a lot of tests.

This way you only need to run the script you're working on, build the ISO and check the result in qEmu..
:P




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users