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

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

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"
Answered 10/22/2004 by: Cooper
Senior Yellow Belt

Please log in to comment
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
Answered 10/22/2004 by: aogilmor
Ninth Degree Black Belt

Please log in to comment
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.
Answered 10/24/2004 by: ds0934
Orange Senior Belt

Please log in to comment
0
But if roaming profiles exist I believe editing HKEY_USERS then becomes a bad idea.
Answered 10/25/2004 by: kkaminsk
Ninth Degree Black Belt

Please log in to comment
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
Answered 11/01/2004 by: sean_c_roberts
Senior Purple Belt

Please log in to comment
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.
Answered 11/01/2004 by: sean_c_roberts
Senior Purple Belt

Please log in to comment
0
This is the method InstallShield support recommended too (self-healing through advertising)...
Answered 01/21/2005 by: milburnr
Yellow Belt

Please log in to comment
Answer this question or Comment on this question for clarity