Ich kämpfe zur Zeit damit, dass ich von Dosbatch einen falschen Errorlevel erhalte. Zwar verlasse ich das Batch mit 'exit 1' der darauf folgende Aufruf im Winstscript führt allerdings einen reboot aus, der nicht gewünscht ist
Code: Alles auswählen
Dosbatch_4
set $ExitCode$ = getLastExitCode
if ($ExitCode$ = "0")
ExitWindows /RebootWanted
endif
Die Dosbatch_4 :
Code: Alles auswählen
ping /n 5 /w 30000 /i 255 srv-rs-opsi-kl01
IF %ERRORLEVEL% == 0 (
echo Alles okay
exit 0
) ELSE (
netsh interface ip set address name="LAN-Verbindung" source = dhcp
netsh interface ip set dns name="LAN-Verbindung" source = dhcp
exit 1
)