/build/static/layout/Breadcrumb_cap_w.png

Modify a registry value for all user profiles

Does anybody know how to modify a registry value for all user profiles on a Windows XP computer? I need to modify the profile of each user who has logged on the computer, the default user profile and the current user profile.

I’ve already written a script which modifies the profiles of each user who has logged on the computer and the default user profile (I scan the profiles folders, load the ntuser.dat hives, and then modify the registry value). But I still have a problem with the current user profile…

It’s not really a problem when the script which modifies the registry value is run locally (simply edit the HKEY_CURRENT_USER hive). But when this script is run remotely with the help of ‘psexec.exe’ and the process is run in the System account (‘-s’ parameter), the HKEY_CURRENT_USER hive is not available and/or does not refer to the real user logged on the computer (?).

I’ve already found a workaround which consists in putting a script in each user profiles. Then, this little script updates the registry value(s) at the logon time. But I’m not really happy with this solution because it does not modify the registry value when the main script is run. So I don’t get the feedback immediately… which is quite annoying when it’s done in the scope of an enterprise distribution.

Does anybody experienced such kind of problem and found a (better) solution?

Thanking you in advance.

0 Comments   [ + ] Show comments

Answers (7)

Posted by: Cooper 20 years ago
Senior Yellow Belt
0
Hello,

I have a small program to solve this issue. My program regmod.exe
scans all user registry entries under HKEY_USERS and modifies
or adds Regvalues from the type REG_SZ (simple string).
regmod.exe can be run from commandline or in a script, if
you have system or administrator permissions e.g.

regmod SOFTWARE\TEST TestVar TestVal or
regmod SOFTWARE\TEST "Test Var Number 2" "Test Value Number 2"
Posted by: aogilmor 20 years ago
9th Degree Black Belt
0
ORIGINAL: Cooper

Hello,

I have a small program to solve this issue. My program regmod.exe
scans all user registry entries under HKEY_USERS and modifies
or adds Regvalues from the type REG_SZ (simple string).
regmod.exe can be run from commandline or in a script, if
you have system or administrator permissions e.g.

regmod SOFTWARE\TEST TestVar TestVal or
regmod SOFTWARE\TEST "Test Var Number 2" "Test Value Number 2"



where it at, this program?

Og
Posted by: ds0934 20 years ago
Orange Senior Belt
0
If you use Kixscript you can verify user localgroup membership in either @wksta\Administrators or using the SidToName function (resolve SID for Administrators to the group name). If the result is 1 (true) you can write to the HKLM hive. Another way would be to use a script that runs under the SYSTEM account, which has rights to modify HKLM also. Not sure if this really helps your particular concerns but I thought it might offer something helpful.
Posted by: kkaminsk 20 years ago
9th Degree Black Belt
0
But if roaming profiles exist I believe editing HKEY_USERS then becomes a bad idea.
Posted by: sean_c_roberts 20 years ago
Senior Purple Belt
0
Um, excuse me if this sounds like a simple sugggestion, but...

When you need to make changes to the registry of each user, just make sure your application is advertised.

Self-healing should automatically "repair" your registry entry for each user profile that logs on...

I have used this method REPEATEDLY to make sure settings which normally get written only to one user profile, in fact, get written to all of them.

Regards,

- Sean Roberts
Posted by: sean_c_roberts 20 years ago
Senior Purple Belt
0
One more thing...

I have WiseScript that does this...

You can use an old I.E. technology called ActiveSetup.

For your installation, make a seperate exe that contains any settings which need to go to all user profiles (usually stuff that gets written to HKCU).

I usually name this exe "peruser.exe" - ActiveSetup will then RUN this exe for each profile logging on for which this exe has not been run (it keeps track, I think).

Lemme know if you need my WiseScript and I'll go digging through my old files.

...I still recommend simply using Advertising.
Posted by: milburnr 19 years ago
Yellow Belt
0
This is the method InstallShield support recommended too (self-healing through advertising)...
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