Solved

Batch file to change registory

Posted on 2011-09-18
4
479 Views
Last Modified: 2012-06-27
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

[HKEY_CURRENT_USER\Software\Google\Google Toolbar\GoogleUpdate]
"InstallTimestamp"=dword:4d60a755

To

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Google\Google Toolbar\GoogleUpdate]
"InstallTimestamp"=dword:tttttt

thanks
0
Comment
Question by:uknet80
  • 2
4 Comments
 
LVL 4

Accepted Solution

by:
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.

Your reg file should contain

@echo off

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

Exit /b 0


You can check out ss64.com/nt/regedit.html for more info.
0
 
LVL 69

Assisted Solution

by:Qlemo
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
reg add "HKCU\Software\Google\Google Toolbar\GoogleUpdate" /v InstallTimestamp /t Reg_DWord /d tttttt /f

Open in new window

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

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

Author Closing Comment

by:uknet80
ID: 36719545
thanks
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

A quick step-by-step overview of installing and configuring Carbonite Server Backup.
Learn about cloud computing and its benefits for small business owners.
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…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now