Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add batch file to registry 1

Status
Not open for further replies.

NickCat11

Technical User
Jul 23, 2005
144
US
Hello,

I am wondering how to add a batch file to the registry. I created the batch file in notepad and then went to the folder I needed to be in in the registry but I can't figure out how to add the batch file in the folder. Any suggestions? I am running Windows XP Media Edition. Thanks

Nick
 
What exactly are you trying to do? You might be able to add a reg value with the address of some batch file, you can add Registry files to the Registry, but I don't think you can insert a batch file into the Registry.

256986 - Description of the Microsoft Windows Registry

322756 - HOW TO: Back Up, Edit, and Restore the Registry in Windows XP

How To Use the Windows XP and Windows Server 2003 Registry Editor Features
 
It gave me these instructions...(Create a bacth file called startRH.bat and write the following line (with [Directory] modified as required):

[Directory]\help.exe START

Startup regedit on the computer and add the batch file to run under the following key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Curr entVersion\RunOnce)


So I created the batch file in notepad with the following info. How do I add it to the registry key. I find the folder but then there is no option to add the file. Thanks
 
Basically I am trying to autostart a program when I reboot...
 
If your only going to run that file once you might just be able to click on the batch file like you do any other exe file, or you may have to run it from a DOS prompt.

Interpreting your instructions, Directory = something like C:/Windows or C:/Some other folder name. This is where you have stored your batch file.

Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce

Create a new Value (of the type REG_SZ) and call it "anything you like". When the Value Name is created, Modify the values data to represent the correct address of the batch file, C:/Windows or C:/Some other folder name.

Current is just one word not curr ent.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top