Manually adding a registry key and Enforce Registry script template issues with K1100
Afternoon,
I am looking to push out a registry change to HKEY_LOCAL_MACHINE.
The registry key has been exported to test, and works fine when using registry editor or entering the key manually via the command line on both my personal machine and the machine we wish to remotely deploy to.
However when using the Enforce Registry script template to create it reports as successfully completed (when running on a pc) but it does not actually add it to the workstation. This occurs both as an offline and online script. I have tried specifically saying run as machine and as the local admin account, neither work.
I checked the ITNinja forums and saw a suggestion to just add the key manually using: "%systemroot%\system32\reg.exe add HKEY_LOCAL_MACHINE\SOFTWARE\Program /v Name /t REG_BINARY /d 0000000000000000 /f" - This command was also tested on both machines and worked just fine. However, when attempting to deploy this via the K1100 scripting, it never pops up in the registry, even after a reboot.
Please advise how I can get the Enforce Registry settings working correctly, or if anyone has any other ideas about how to go about updating this. Really appreciate any input or suggestions.
KACE Agent version: 5.3.53177
Thank you.
Answers (2)
all we needed to do was tell the key to apply to HKLM64 instead of just HKLM
When you create this script treat it as you are creating a merge file. You need to have multiple lines.
If you exported the key you want from the registry and just remove the "Windows Registry Editor Version 5.00" line from the file that is the layout you need to put in the script window when creating the script on the k1000.
Comments:
-
Hey guys, thanks for the comments.
First off, did try using the new agent/server version and the key never applied. Also, when you dump the whole registry key text from the exported file into the Enforce Registry settings script, it automatically removes the "Windows Registry Editor Version 5.00" line, as well as automatically putting each value on a separate line, properly creating separate tasks as part of the script.
Thanks to KACE support, it was a simple fix but I hope this helps others in the future - We are all 64 bit systems these days and all we needed to do was tell the key to apply to HKLM64 instead of just HKLM.
Hope this fix helps others, appreciate the help. - CMH-IT 11 years ago-
that makes sense, did not think to ask if you were using 32 vs 64 - SMal.tmcc 11 years ago