Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Help Needed on below
:start
cd\
cd tt
pslist \\192.168.48.85 tcon
IF ERRORLEVEL 0 goto:start
IF ERRORLEVEL 1 goto:Run
:Run
cd\
cd ttTab.exe
Keep getting same result for both errorlevels. dosent go beyond errorlevel 0

Assuming the pslist command DOES set an ERRORLEVEL, the line IF ERRORLEVEL 0 will always return true - you need to check the levels in reverse order, highest to lowest, as the check is for "n or higher". Also not sure about your syntax.
IF ERRORLEVEL 1 GOTO run
GOTO startshould work.

![]() |
![]() |
![]() |
| Login or Register to Reply | |
| Login | Register |
| Ads by Google |