:Start
if exist "c:\Program Files\Altiris\Software Virtualization Agent" goto installed
if not exist "c:\Program Files\Altiris\Software Virtualization Agent" goto notinstalled
goto end:installed
echo installed
set errorlevel=0
goto end:notinstalled
echo notinstalled
set errorlevel=1
goto end:end
echo %errorlevel%
if exist "c:\Program Files\Altiris\Software Virtualization Agent" goto installed
if not exist "c:\Program Files\Altiris\Software Virtualization Agent" goto notinstalled
goto end:installed
echo installed
set errorlevel=0
goto end:notinstalled
echo notinstalled
set errorlevel=1
goto end:end
echo %errorlevel%
Once this job had been run by the Client Task Agent, the Task Server displayed a return code of 0 with a status of success, even though the script return a code of 1.
By default, Task Server only records the action of running the script, and not what actions the script actually performs.
Applies To
Task Server 6.0, 6.0 SP1