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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create bat file to modify hkey_current_user

Status
Not open for further replies.

juvin

MIS
Oct 1, 2002
5
US
I am an IT analyst with 250 computers on a domain. We need to change EVERY users hkey_current_user registry setting. Is there a way this can be done without us having to logon as each and every individual user?

I was thinking of a .bat file that could run on startup that would change the key that was needed, but hence, I am a networker not a programmer. I can write VERY basic bat files but am out of my depths here.

ANYONE?
 
If you can create files with the necessary information (.reg files), you can call regedit with the relevant file as an argument :

regedit.exe new_info.reg

It will probably ask the user if it's ok to add the information ..............

/JOlesen
 
Hi Juvin!!!

To avoid regedit for asking you is you want to merge the information from the .reg file use the /s switch

Code:
regedit /s values.reg

add this line to a simple .cmd file (win2k / winxp) or a .bat file, like this

Code:
@echo off
regedit /s values.reg

and add this .cmd / .bat file to a group policy you create in active directory to the user configuration part

user configuration \ windows settings \ scripts \ logon

doing this you will guarantee that every time a user logons to the domain, the script will run with system privileges and the registry will be modified...

you will have to modify, in the batch file, the path to the values.reg making it relative to the sysvol directory

Code:
regedit -s \\ghostsrv\sysvol\ghost.com\scripts\values.reg

hope this help!!!

this is a general idea, if you want something more detailed, post a message on the thread

CU

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top