0 Replies - 1034 Views - Last Post: 17 November 2009 - 04:47 PM

#1 Gorian  Icon User is offline

  • ninja DIC
  • member icon


Reputation: 153
  • View blog
  • Posts: 1,853
  • Joined: 28-June 08

Using Start, Running alternate Program

Posted 17 November 2009 - 04:47 PM

Description: replace the %MyFile% with the full path to your file. Since a successful program returns 0, this will exit if the first program launches succesfully.This can be used to run an alternate program, if the previous does not start for some reason
:: Start my program

@echo off

start "" "%MyProgram%"
If ERRORLEVEL == 1 GOTO Alternate
Else Goto EOF

:Alternate
start "" "%MyAlt%"
Goto EOF

:EOF
cls
exit

Is This A Good Question/Topic? 0
  • +

Page 1 of 1