Long story short, I accidentally royally screwed up my HKLM\SYSTEM registry directory trying to fix WinApps permissions that were changed with a Windows security patch.
As of right now, my system is completely unable to boot with a BSOD message of "inaccessible boot device" caused by my changes. I've tried
- changing values of registry keys to enable AHCI
- Safe Mode
- sfc /scannow + chkdsk
- Checking for pending packages in DISM
- Moving files from Regback to /config
importing my working backup of SYSTEM.reg into the registry under windows recovery command prompt and WinPE
One of those would normally work, but my issue is caused by a junk SYSTEM registry.
I need to create a SYSTEM HIVE file from my .REG backup of the HKLM\SYSTEM directory.
I thought this would be a very simple solution, but the only thing that I've managed to find on this topic is a random MSDN post from years ago that seems like it would accomplish what I want, but I can't get the script to work. (https://blogs.msdn.microsoft.com/sergey_babkins_blog/2014/11/10/how-to-create-a-brand-new-registry-hive/)
- Trying to run his script as a .bat returns an error stating:
function' is not recognized as an internal or external command, operable program or batch file.
- Trying to run the .bat in powershell returns:
merge.bat : The term 'merge.bat' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
If anyone knows how to get the above powershell script to work, please let me know.