Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upReplace registry_key with reg.exe #1
Comments
dhoer
added
the
enhancement
label
Mar 23, 2015
dhoer
changed the title from
Replace recipes with windows_reg lwrp
to
Replace registry_key call with reg.exe
Mar 23, 2015
dhoer
changed the title from
Replace registry_key call with reg.exe
to
Replace registry_key with reg.exe
Mar 23, 2015
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
mhemesath
Mar 29, 2015
+1 This would be useful. Currently my selenium user is not my chef user so I need to set some of these settings manually.
mhemesath
commented
Mar 29, 2015
|
+1 This would be useful. Currently my selenium user is not my chef user so I need to set some of these settings manually. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
dhoer
Apr 17, 2015
Owner
This might be a better approach https://sherwoodbase.wordpress.com/2013/02/15/how-to-add-hkcu-keys-and-values-for-all-the-users-with-chef/
|
This might be a better approach https://sherwoodbase.wordpress.com/2013/02/15/how-to-add-hkcu-keys-and-values-for-all-the-users-with-chef/ |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
dhoer
closed this
in
99541cc
Apr 29, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
dhoer commentedMar 23, 2015
While Chef's registry_key is great for configuring a current user that the chef-client is running as, it falls down when it comes to configuring default settings for new users and configuring existing users. To do that, you need to update the appropriate user's hive file
ntuser.dat.The Windows way is to use
regedt32.exeapplication and "load hive" menu option to load the file into a registry key and then edit that key, then unload the hive again. But if you want to do it from a script or command line, you need thereg.execommand line utility.Step 1 - Load User Registry Hive
reg.exe load HKCU\{username} c:\users\{username}\ntuser.datStep 2 - Make a normal .reg file and import it
reg.exe import "update.reg"Step 3 - Commit and Unload User Registry Hive
reg.exe unload HKCU\{username}This approach can be wrapped in a LWRP that would take a .reg.erb template file.