Hello Sokatra,
Thank you for your tips. I think I didn't explain myself correctly.
I just want to do a reboot after the executable's execution and return the code to the OCS Server.
This part of the code never runs even if the .EXE has finished the installation:
echo %errorlevel% >> C:\Logs\result.txt
echo 'before reboot' >> C:\Logs\result.txt
shutdown.exe /r /f
echo 'after reboot' >> C:\Logs\result.txtexit /b errorlevel%
If I launch the SETUP.cmd MANUALLY everything happens. Even the reboot.
If I do an OCS Deployment, it only launchs the .EXE and nothing else. It doesn't even reach the echo with the errorlevel.
The executable is like 60mbs and takes like half minute to be installed. Am I doing something wrong? I have tried many tips/fixes but nothing worked out.
This command does a reboot in 30s: shutdown /r /f. Being so, I should be able to log the before/after reboot and the error code. But as I said, everything below the execution of the .EXE doesn't happen through an OCS deployment.
Kinds regards,
Josh