How to? cmdebug (24 2 50) no errorvel from net use

Aug 19, 2019
3
0
Hello
a simple batch

@echo off
net use \\WS01\Win7-01$
echo %ERRORLEVEL%
pause

shows in echo errorlevel 2 if it running without debugger
inside cmdebug the output of %ERRORLEVEL% is empty

OS: Windows 7, 64 bit
 
Aug 23, 2010
618
8
What about other programs that end in error?
What if you CALL a batch file with a single line "EXIT /B 1" ?
 
Aug 19, 2019
3
0
same procedure

dir \\WS01\Win7-01$
echo %ERRORLEVEL%

empty %ERRORLEVEL% in cmdebug



if I call a single line from cmdebug

EXIT /B 1

I got:
EXIT /B 1
in cmdDebug Window