troubleshooting Question

reg.exe ADD commands to REG_SZ Modifications not showing

Avatar of garryshape
garryshape asked on
Windows BatchScripting Languages
8 Comments3 Solutions799 ViewsLast Modified:
Windows 7, testing batch file, works fine on other keys/values in the default user hive, but I don't think it's working properly for key values that are of the REG_SZ datatypes.

REG LOAD HKU\DefaultUser %SystemDrive%\Users\Default\NTUSER.DAT

%windir%\System32\reg.exe ADD "HKU\DefaultUser\Control Panel\Desktop" /v AutoEndTasks /t REG_SZ /d 1 /f
%windir%\System32\reg.exe ADD "HKU\DefaultUser\Control Panel\Desktop" /v HungAppTimeout /t REG_SZ /d 1000 /f
%windir%\System32\reg.exe ADD "HKU\DefaultUser\Control Panel\Desktop" /v MenuShowDelay /t REG_SZ /d 10 /f
%windir%\System32\reg.exe ADD "HKU\DefaultUser\Control Panel\Desktop" /v WaitToKillAppTimeout /t REG_SZ /d 20 /f
%windir%\System32\reg.exe ADD "HKU\DefaultUser\Control Panel\Desktop" /v LowLevelHooksTimeout /t REG_SZ /d 1000 /f


So if I run the above, then go into the actual Registry GUI and load the same hive and go to Control Panel\Desktop for the default user's hive, the settings don't appear changed.
MenuShowDelay has a value of 0 for example, when it should have been set to 10 per the command.
But, if I run the reg QUERY command against the key, the values appear to be changed to 10, not 0.

Is it really changed in the Registry? Or do I have to reboot for the changes to show in the Registry's GUI?
Rob Miners

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 3 Answers and 8 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 3 Answers and 8 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros