Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
• Status: Solved
• Priority: Medium
• Security: Public
• Views: 501

# 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
0
uknet80
• 2
2 Solutions

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

C++ DeveloperCommented:
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

## Featured Post

• 2
Tackle projects and never again get stuck behind a technical roadblock.