I’m a SCCM rookie and recently I had to set a registry value in HKLM\Software key, so I wrote a simple batch file and using “reg add HKLM/Software/MyKey /v MyValueName /t REG_Dword /d 1” command and I put it in the batch file. So how the situation works :
- when I ran the batch file manually the reg key and value was created and set properly
- when I tried to run same batch file through SCCM the reg key wasn’t created and value was not set
So I started to do some small research using Systinternals Process Monitor. After reviewing the process monitor log, I found that the registry key and value were in fact created, but under HKLM/Software/SysWOW6432\MyKey, so on the redirected 32bit node. That’s happening because client is 32-bit application.
To correct this you just need to add “/reg:64” it the “reg add ” command.
There is a great post about it on Brpo’s Blog