Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

scripting regedit to edit another user's registry in NT/2K/XP?

Status
Not open for further replies.

dpetzinger

IS-IT--Management
Apr 1, 2004
3
US

When a user logs on to our network, I have a script that makes registry edits. However, the users are unprivelidged, so it has to be done with runas (via a privelidged user); here is where i'm running into problems.

if the following script is run as "jim" (unprivelidged) is logging in:
@runas /user:computer\administrator "c:\windows\regedit.exe /s c:\fix.reg"
unfortunately for me, that applies the registry edit to to "administrator", not "Jim".

I've tried the following as well, but it seems to do nothing:
@runas /user:computer\administrator "c:\windows\regedit.exe /s /R:c:\docume~1\jim\ntuser.dat c:\fix.reg"

this is all really easy in windows 98, but not so easy here.

thanks for any help anyone can offer.

-dave

p.s. don't worry about the password for administrator, it's loaded via javascript...
 
You do not have to runas under XP for registry edits; and as you noted the edits would be made in the Administrator HKCU context and not the user. There are several other ways to approach this, including Group Policy and logon scripts to "push" the registry edits.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top