Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Friday, October 3, 2014 4:44 AM
Hi
I am sure someone here has done this via sccm. I have to push some changes that are HKEY_Current_user settings. I'd to load the settings into the default user profile so all user who login get these settings.
Below are the regkeys I'd like to set for all users, is there a way to accomplish this in sccm?
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\mov\UserChoice]
"Progid"="Applications\Duo.exe"
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\mp4\UserChoice]
"Progid"="Applications\Duo.exe"
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\avi\UserChoice]
"Progid"="Applications\Duo.exe"
I tried this.
reg load "hku\defuser" "C:\Users\Default\NTUSER.DAT"
imported the keys below
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\defuser\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\mov\UserChoice]
"Progid"="Applications\Duo.exe"
[HKEY_CURRENT_USER\defuser\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\mp4\UserChoice]
"Progid"="Applications\Duo.exe"
[HKEY_CURRENT_USER\defuser\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\avi\UserChoice]
"Progid"="Applications\Duo.exe"
and then I unload hive
reg unload "hku\defuser"
this looks right to me but it didn't work. I am always looking for a better way to do things in sccm any advice would be appreciated. On how to get hkcu settings to all users. using sccm.
All replies (10)
Friday, October 3, 2014 5:10 AM ✅Answered | 1 vote
I have done something similar by running 3 steps in my TS. However I've only merged HKLM settings into the default user profile and not the HKCU hive. Someone else might be able to confirm if this is possible. If it isn't then you could use a Group Policy Preference to merge the reg key changes for HKCU on computers.
Step 1 - Load Default User Registry Hive (Run Command Line)
cmd.exe /c reg.exe load HKEY_LOCAL_MACHINE\defuser c:\users\default\ntuser.dat
Step 2 - Import Default User Profile Preferences (Run Command Line with Package Specified)
cmd.exe /c reg.exe import "Userprefs.reg"
Step 3 - Commit and Unload Default User Registry Hive (Run Command Line)
cmd.exe /c reg.exe unload HKEY_LOCAL_MACHINE\defuser
Cheers
Damon
Friday, October 3, 2014 6:44 AM ✅Answered
Hi,
you don't have to generate a GUID, just use some unique string like "MyActiveSetup".
Best regards,
Philip
Friday, October 3, 2014 7:25 AM ✅Answered
The default user hive is great during OSD but not so good after because it won't affect existing user profiles. ActiveSetup is nice because it will affect new and existing profiles. The only real problem with ActiveSetup is that it is not -- to my knowledge -- something officially supported outside of direct use in Windows Installer and is not very well documented (from what I can usually find at least). It does work well though.
You can also write a script to enumerate all user HKU hives and make changes there (this of course involves dynamically loading ntuser.dat files and is not conceptually that simple but you can find example code for doing it).
Jason | http://blog.configmgrftw.com | @jasonsandys
Friday, October 3, 2014 5:10 AM
Hi,
in these scenarios I normally use an ActiveSetup instead, as it will run onces for each user that logs on to the computer it works great. Here are an example http://www.itninja.com/blog/view/appdeploy-articles-activesetup
You can just as easy run a reg.exe command or script instead.
Regards,
Jörgen
-- My System Center blog ccmexec.com -- Twitter @ccmexec
Friday, October 3, 2014 5:23 AM
Thank you Damon, and Jorgen you have always been helpful to me with my sccm question I appreciate you guys very much.
This is the first time I heard of activesetup, I have a question Jorgen, I checked out the link, I think I understand it but it says you should use a GUID, how do you generate a unique GUID?, if I use the activesetup method in a lab of 40 computers lets say, does each pc need a unique guid, in order to utilize Activesetup in the registry?
Friday, October 3, 2014 1:37 PM
If I understand what you are saying. For Example Activesetup in the registry should look like this
[HKLM\SOFTWARE\Microsoft\Active Setup\Installed Components\MyActiveSetup}]
"Version"="1"
"StubPath"="cmd.exe /c reg.exe import Userprefs.reg {MyActiveSetup}"
and UserPrefs.reg contains.
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\mov\UserChoice]
"Progid"="Applications\Duo.exe"
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\mp4\UserChoice]
"Progid"="Applications\Duo.exe"
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\avi\UserChoice]
"Progid"="Applications\Duo.exe"
Thanks again everyone for all your help it's much appreciated.
Friday, October 3, 2014 2:16 PM
Just one Addition:
Why the {MyActiveSetup} after behind the reg Import?
best regards,
Philip
Friday, October 3, 2014 2:19 PM
I thought it was needed because I saw a guide that had
[HKLM\SOFTWARE\Microsoft\Active Setup\Installed Components\GUID}]
"Version"="1"
"StubPath"="cmd.exe /c reg.exe import Userprefs.reg {GUID}"
Friday, October 3, 2014 2:23 PM
This is not necessary :)
Friday, October 3, 2014 2:25 PM
Thanks man much appreciated.