# Batch file to change registory

Hello Experts,

How to write a batch file for changing Registry value, and I want to do that under AC GPO, when user login the batch file should run

for example if I want to change following:
Windows Registry Editor Version 5.00

"InstallTimestamp"=dword:4d60a755

To

Windows Registry Editor Version 5.00

"InstallTimestamp"=dword:tttttt

thanks
###### Who is Participating?

Commented:
Paste the information into notepad and save it as timestamp.reg

Place the reg file on a share that can be accessed my the GPO.

@echo off

Regedit /s \\path\to\timestamp.reg

Exit /b 0

0

Batchelor, Developer and EE Topic AdvisorCommented:
If you have single registry changes only, instead of a complete set, it usually is much easier to just code that into the batch:
@echo off

That allows for e.g. checking for specific values, adding some value, aso.
Regarding execution, just put the script into the NetLogon share and create an entry in GPO for Login pointing to the batch.
0

Author Commented:
I create .bat file and pasted your code, double clicked the file but registry hasn't changed?
0

Author Commented:
thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.