Solved

# Batch file to change registory

Posted on 2011-09-18
485 Views
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
Question by:uknet80
[X]
###### Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points
• 2

LVL 4

Accepted Solution

bloodygonzo earned 250 total points
ID: 36556220
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

LVL 70

Assisted Solution

Qlemo earned 250 total points
ID: 36556512
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 Comment

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

Author Closing Comment

ID: 36719545
thanks
0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A project that enables an administrator to perform actions within a user session context not just at the time of login but any time later on day(s) or week(s) later.
This article shows the method of using the Resultant Set of Policy Tool to locate Group Policy that applies a particular setting.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
###### Suggested Courses
Course of the Month3 days, 21 hours left to enroll