Modify All Users HKEY_CURRENT_USER key?
I need to modify a subkey of HKEY_CURRENT_USER for all profiles that on the computer my script executes on. Does anyone have a good method of doing this?
0 Comments
[ + ] Show comments
Answers (6)
Please log in to answer
Posted by:
mrtap
20 years ago
If you need to add a new value to the registry, then you could try writing to "HKEY_USERS\.DEFAULT\...". This appears to be the fallback place that windows looks if a value does not exist in HKEY_CURRENT_USER.
If you need to change an existing key then you can cycle through "HKEY_USERS\" to get to all the user hives that are currently loaded. Note that on W2K/WXP each user will have two hives - the extra one is the user specific HKEY_CLASSES_ROOT.
If you what to change an existing key for all profiles (even the ones not logged in), then you will have to load the user registry hives manually - but I will assume this isn't what you need to do.
If you need to change an existing key then you can cycle through "HKEY_USERS\" to get to all the user hives that are currently loaded. Note that on W2K/WXP each user will have two hives - the extra one is the user specific HKEY_CLASSES_ROOT.
If you what to change an existing key for all profiles (even the ones not logged in), then you will have to load the user registry hives manually - but I will assume this isn't what you need to do.
Posted by:
Ap0kalipSe
20 years ago
Posted by:
sean_c_roberts
20 years ago
I would think that you don't need to worry about profiles which haven't logged in... if the profile will be used, it will log on eventually.
If the keys you need are for a specific application, just install that application as an MSI with the ALLUSERS property set to 1.
That way, when the app gets launched, even from a different profile, any missing components (including your reg keys) get self-repaired - i.e. placed in the registry of the currently logged in profile.
If the keys you need are for a specific application, just install that application as an MSI with the ALLUSERS property set to 1.
That way, when the app gets launched, even from a different profile, any missing components (including your reg keys) get self-repaired - i.e. placed in the registry of the currently logged in profile.
Posted by:
rogebil
20 years ago
Posted by:
jmcfadyen
20 years ago
Posted by:
sean_c_roberts
20 years ago
Ugh!
I have to respectfully disagree about using ActiveSetup.
It worked GREAT pre-MSI, but it's a pain to configure. Plus, you need a seperate exe with JUST your user-specific reg keys and files - this is what gets run when ActiveSetup sees a new profile login.
Just my opinion :)
P.S. When I was at Pfizer, we had a Wise template for ActiveSetup - if anyone wants a copy, lemme know and I'll see if I can dig it up.
Kind regards,
- Sean
I have to respectfully disagree about using ActiveSetup.
It worked GREAT pre-MSI, but it's a pain to configure. Plus, you need a seperate exe with JUST your user-specific reg keys and files - this is what gets run when ActiveSetup sees a new profile login.
Just my opinion :)
P.S. When I was at Pfizer, we had a Wise template for ActiveSetup - if anyone wants a copy, lemme know and I'll see if I can dig it up.
Kind regards,
- Sean
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.