Re: batch scripting




"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

  • Re: batch scripting
    ... if exist reg hklm\software\networkassiocates then goto v85 ... reg query hklm\software\mcafee 2>nul && goto V80 ...
    (microsoft.public.scripting.vbscript)
  • [PATCH 4/6] drivers/ide: Convert printk(KERN_WARNING to pr_warning(
    ... goto abort; ... if (ret < 0) ... if (err < 0) ... if (!(reg & INTSTS_ACTEINT)) { ...
    (Linux-Kernel)
  • Re: Remove Carriage return in BATCH file
    ... The NEW reg is 5.1.2600.2180 ... call:getSource "%key%\%%A")) ... GOTO:EOF ...
    (microsoft.public.win2000.cmdprompt.admin)
  • Re: batch scripting
    ... IF NOT ERRORLEVEL 1 GOTO:V80 ... REG QUERY HKLM\SOFTWARE\NETWORKASSIOCATES> NUL ... IF NOT ERRORLEVEL 1 GOTO:V85 ...
    (microsoft.public.scripting.vbscript)
  • batch scripting
    ... I want check of there exist a registrykey, if not then check a other ... if exist reg hklm\software\networkassiocates then goto v85 ...
    (microsoft.public.scripting.vbscript)