Quantcast
Channel: Ocsinventory Q&A - Recent questions and answers in OCS Inventory NG agent
Viewing all articles
Browse latest Browse all 4573

Answered: exit code not working in my package

$
0
0
as jacquesh explained .. the after section will not be executed after the real reboot.

If you really want to reboot with a standard reboot command the i recommend to use the

shutdown -s -t <number in seconds>

command. So try to shutdown in 3 minutes .. so ocs-inventory has a chance to report the success before the reboot

perhaps try to use the start command before the shutdown command

start shutdown.exe /r /f

But there are much more possibilities to warn the user about the reboot.

shutdown -r -t 300 -c "This system is shutting down in 300 seconds.."
With the help of some scripts you can even do much more.
For example i silently deploy a package with ocs-inventory.
Inside of my script i create a message for the user where he gets warned about something (reboot, and so forth)

Kind regards

Sokatra

Viewing all articles
Browse latest Browse all 4573

Trending Articles