Batch script hangs on REG ADD

Various / HOME BUILT
August 9, 2017 at 01:23:07
Specs: Windows 10 Pro x64, Intel i7 6700k, 32GB 3200MHz DDR4 RAM
I'm working on a batch script that adds some registry keys here and there, it successfully manages to add keys to HKCR, however it freezes whenever adding to HKCU. Queries work just fine. Whenever it's stuck I can just enter whatever I want, even hitting return just makes a newline in the command prompt window. It never proceeds. Checking task manager while it hangs shows that reg.exe remains running and only ends when the command prompt window is closed.

Here's parts of the script:
(this fails)

reg add "HKCU\Software\rbzscript\radio" /f /v "CodePage" /d "!preferredCodePage!"

(this succeeds)
reg add "HKCR\!val!\shell\radio\command" /f /ve /d "\"%~f0\" \"%%1\"" >>"%temp%\stderr.txt" 2>&1
reg add "HKCR\AppXqj98qxeaynz6dv4459ayz6bnqxbyaqcs\shell\radio\command" /ve /d "\"%~f0\" \"%%1\"" >>"%temp%\stderr.txt" 2>&1

Any suggestions as to why this happens?

EDIT:
Forgot to add, this only happens on another machine I have running Win10 Home x64. On my Win10 Pro x64 machine it works okay. Running with admin privileges doesn't change anything

Don't worry if plan A fails, there are 25 more letters in the alphabet ;)

message edited by RainBawZ


See More: Batch script hangs on REG ADD

Reply ↓  Report •

#1
August 12, 2017 at 12:03:43
Unable to replicate; maybe try including the /t switch if it's not supposed to be a REG_SZ?

How To Ask Questions The Smart Way


Reply ↓  Report •

#2
August 12, 2017 at 12:14:24
It's supposed to be a REG_SZ value but I could try including it regardless.

Don't worry if plan A fails, there are 25 more letters in the alphabet ;)


Reply ↓  Report •
Related Solutions


Ask Question