Let’s say you want to add a registry key while you are in windows PE. In order to achieve this we have to load the appropriate registry hive from the files under %windirsystem32config.
Under the config folder there are these files that are interesting:
- Software – This is the HKLMSoftware hive
- System – This is the HKLMSystem hive
- Security – This is the HKLMSecurity hive
Okay. So first we have to load the hive. You have to do this after the image has been applied.
Run the following command in the task sequence:
reg load HKLMTemp c:windowssystem32configsoftware
This will load the Software to a Temp folder in Windows PE registry. We now have the option to add registry keys as we like.
Now you can run for example this command to add a key:
reg add HKLM TempAdobeAcrobat Reader9.0AdobeViewer" /v EULA /d 1 /t REG_DWORD /f
This will accept the eula in Adobe Reader.
Now we have to unload the software hive. That we can do with this command:
reg unload HKLMTemp
Good luck with your registry editing. Microsoft also has some information in regards of the hives: