Re: batch scripting

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Thanks Pegasus and Jon for the input it works.


"Pegasus [MVP]" <news@xxxxxxxxxxxxx> schreef in bericht
news:uGAKnT9sJHA.4068@xxxxxxxxxxxxxxxxxxxxxxx

"Jack" <j.baltus@xxxxxxxxxx> wrote in message
news:d7b1b$49d51ddb$5ed32516$27005@xxxxxxxxxxxxxxxxxxxxxxxxxxx
Hello,


Can anybody help me with a script.

I want check of there exist a registrykey, if not then check a other
registrykey.



like this.



if exist reg hklm\software\mcafee then goto v80
if exist reg hklm\software\networkassiocates then goto v85

:v80

goto end


:v85

goto end

Here is a condensed version of Jon's suggestion:

@echo off
reg query hklm\software\mcafee 2>nul && goto V80
reg query hklm\software\networkassociates 2>nul && goto V80
goto :eof

:V80
REM Do V80 Stuff
ECHO V80
goto :eof

:V85
REM Do V85 Stuff
ECHO V85
goto :eof




.



Relevant Pages