Solved

Batch file to change registory

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In-place Upgrading Dirsync to Azure AD Connect
This article describes my battle tested process for setting up delegation. I use this process anywhere that I need to setup delegation. In the article I will show how it applies to Active Directory
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 …
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.

733 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