Job_RebootWS
Description
Section titled “Description”Requests a reboot of the computer. The function doesn’t reboot the computer itself: it tells the CapaInstaller agent that runs the script to reboot the computer when the job has ended. In order for this function to work properly the script needs to be executed by an Agent that can do the actual reboot.
The CapaInstaller agent then doesn’t run any more jobs in that agent run. It restarts the computer after a 30-second warning and forces open applications to close. The remaining jobs run at the next agent run.
The end user sees a standard message that the computer will reboot within a short time. The message is also shown when you use Job_SilentInstallation. The message closes after 30 seconds, and the script doesn’t wait for it. The message text comes from the language set with Job_SetLanguage.
After a reboot request, Job_InstallationCompleted doesn’t show its message.
Syntax
Section titled “Syntax”Job_RebootWS(sMsg) As Boolean
Parameters
Section titled “Parameters”sMsg (String)
Section titled “sMsg (String)”Reason for the reboot. The text is written to the log as Reboot requested by <sMsg>. It isn’t shown to the end user.
Example
Section titled “Example”If bStatus Then bStatus = Job_RebootWs("Reboot needed in order to complete installation")Related functions
Section titled “Related functions”Job_LogoffUserAndRebootWS Job_ShutdownWS Constants Package Property Variables