Option to edit Windows registry via FOG PXE boot?
Would it be possible to edit the Windows registry via FOG PXE boot? I have machines that tend to reset the CMOS settings which causes endless boot loops due to the wrong SATA mode. Having the option to make changes to the registry with PXE would allow me to edit the keys to allow Windows to boot without touching the machine.
You could also simply edit the registry before capture of course.
But if you have, say an SSD, I don’t particularily recommend leaving it in IDE mode.
Thanks for the replies. The reason for the method is due to an image made for over 200 machines (thankfully all the same model) and not wanting to go to each machine, back them up, set bios setting, reimage and restore data. The machines all have good cmos batteries but a power flicker will sometimes cause them to revert to defaults like it has a post failure detection. Anyway, the image was made with AHCI mode and the default BIOS setting is RAID (stupid Dell). The SATA mode was set to AHCI mode in case some of them were to be upgraded to SSD as AHCI gives better compatibility/performance boost, we would just need to clone it and boot it. This site in question for me is a “site as is” problem that I’m sick of having to go to the machines just to change one setting in the BIOS to fix. Since I know what the default SATA mode is that’s being reverted too, I’ve been looking for a method of just changing the reg keys to reflect the settings but doing it remotely. It would save me having to physically go to the machines. I’ll check out the posted URLs and give them a try. My goal is to “fix” the image with the defaults for new installs and have the “reg patch” for the rest. The reg keys in question need to be changed to the following:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\msahci] "Start"=dword:00000000 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\pciide] "Start"=dword:00000000 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\iaStorV] "Start"=dword:00000000
look at the tail end of the first script in this post: https://forums.fogproject.org/topic/8889/fog-post-install-script-for-win-driver-injection/4
It explains how to use the linux utility
regedto import registry changes into Windows. You will need to use a postinstall script to deliver this script to your target computer.
But just a point to mention you are saying that your CMOS settings are being reset. (First replace your battery). Setting registry values will not do you any good since your windows install won’t boot because the SATA mode is incorrect, causing windows to not boot. I assume you need linux to change your BIOS/firmware settings to correct this condition? If so you are out of luck. FOG/linux/Windows dosen’t have the ability to change bios settings.
Following along with what Tom said below, you just need to write a postdownload script to do the work you need done. Get started with that here:
Try your best to do it yourself. If you need help, ask here.
FOS already contains a registry editor too, just in case anybody was unsure. That’s how we do “hostname early”
@psyfer9983 since editing the Registry can be done via Linux, you could just add another boot option for a live ISO that contains a distribution with a registry editor pre-installed (or install it manually).