New
#1
Registry changes apparently successful, but NO changes actually made!
This is a nasty and incomprehensible problem I've had with two 64-bit Windows 7 SP1 on two separate machines: When I make command-line registry changes, even though no error is thrown, often the changes do NOT actually show up!
I can make changes just fine with any GUI reg editor such as with Regedit or my preferred registry editor, Registrar Registry Manager 7.6 Pro. It's ONLY when I try to do this with a command line that it so often fails.
Here are some examples that usually fail to actually change anything:
Contents of C:\ChangeReg.reg:
Contents of Change01.bat:Code:Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\ACD Systems\ACDSee Pro\70] "DBFile"="C:\\Users\\All Users\\AppData\\Local\\ACD Systems\\Catalogs\\70Pro\\Default.dbin"
Code:NirCmd ElevateCmd RunAsSystem C:\Windows\RegEdit.exe /S "C:\ChangeReg.reg" IF %ERRORLEVEL% NEQ 0 GOTO :OOPS Echo "Successfully changed" GOTO :DONE :OOPS Echo "Regedit FAILED" :DONE Pause
Contents of Change02.bat:
Contents of Change03.bat:Code:C:\Windows\System32\reg.exe IMPORT "C:\ChangeReg.reg" IF %ERRORLEVEL% NEQ 0 GOTO :OOPS Echo "Successfully changed" GOTO :DONE :OOPS Echo "Reg FAILED" :DONE Pause
Code:C:\Windows\System32\reg.exe IMPORT "C:\ChangeReg.reg" /reg:64 IF %ERRORLEVEL% NEQ 0 GOTO :OOPS Echo "Successfully changed" GOTO :DONE :OOPS Echo "Reg FAILED" :DONE Pause
Contents of Change04.bat:
Not a single one of those batch files works! The "FAILED" messages NEVER appear, yet the registry entries remain unchanged.Code:C:\Windows\System32\reg.exe ADD "HKEY_CURRENT_USER\Software\ACD Systems\ACDSee Pro\70" /v DBFile /t REG_SZ /d "C:\Users\All Users\AppData\Local\ACD Systems\Catalogs\70Pro\Default.dbin" /f IF %ERRORLEVEL% NEQ 0 GOTO :OOPS Echo "Successfully changed" GOTO :DONE :OOPS Echo "Reg FAILED" :DONE Pause
What's going on? What am I doing wrong?
Thanks!