?
Solved

Batch file to change registory

Posted on 2011-09-18
4
Medium Priority
?
486 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
[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
  • Learn & ask questions
  • 2
4 Comments
 
LVL 4

Accepted Solution

by:
bloodygonzo earned 1000 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 70

Assisted Solution

by:Qlemo
Qlemo earned 1000 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

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Recently, Microsoft released a best-practice guide for securing Active Directory. It's a whopping 300+ pages long. Those of us tasked with securing our company’s databases and systems would, ideally, have time to devote to learning the ins and outs…
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
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.
Suggested Courses

800 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