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.
Registry Editor
Name: CWoodward Date: June 6, 2006 at 14:59:14 Pacific OS: Windows XP Home Edition CPU/Ram: Intel Celleron Product: Dell
Comment:
Is there a way to use a batch file to check if a registry value exists?
IF %ErrorLevel%==1 GOTO Failed IF %ErrorLevel%==0 GOTO Success ~~~~~~~RegTest.bat
If the value "BLAH" doesnt exist, the file displays the phrase, "Error: The system was unable to find the specified registry key or value". Is there any way to test to see if a value exists without displaying an error message if it doesnt exist?
0
Response Number 3
Name: Mechanix2Go Date: June 6, 2006 at 23:19:43 Pacific
Reply:
I never heard of the "reg command", but in general commands write errors to stderr which can not be easily redirected.
Results which go to stdout can readily be redirected:
somecomd > nul
If at first you don't succeed, you're about average.
M2
0
Response Number 4
Name: ghostdog Date: June 7, 2006 at 23:46:59 Pacific
Summary: 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 Wi...
Summary: Hi all, I'm new here and I really hope you guys can help me with this. I want to add the current path variable to a registry key but it won't be added if I don't use a double backslash (ie: C:\\Window...
Summary: Hello everyone, I have a batch script which is working wonders, but I want to improve it. It deletes some of the obvious Recent files: DEL "C:\Documents and Settings\Diane\Application Data\Microsoft\...