Solved

# Batch file to change registory

Posted on 2011-09-18
474 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
• 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 68

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

A quick step-by-step overview of installing and configuring Carbonite Server Backup.
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…