/build/static/layout/Breadcrumb_cap_w.png

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)

Posted by: mrtap 20 years ago
Senior Yellow Belt
1
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.
Posted by: Ap0kalipSe 20 years ago
Senior Yellow Belt
1
Aside from editing .default ( the all users registry ) you could have a reg file import with the logon script, thats how we import per user settings for accounts that already exist.
Posted by: sean_c_roberts 20 years ago
Senior Purple Belt
1
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.
Posted by: rogebil 20 years ago
Senior Yellow Belt
1
I've had some luck putting those entries in HKLM. They seem to automagically get transferred to HKCU when a user logs on if the HKCU needs it.
Posted by: jmcfadyen 20 years ago
5th Degree Black Belt
1
try investigating active setup as well. its a great way to do things to each user without the requirement of complex scripting.
Posted by: sean_c_roberts 20 years ago
Senior Purple Belt
1
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
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ