Solved

Batch file to change registory

Posted on 2011-09-18
4
485 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 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 70

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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

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 …

691 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