Job_LogoffUserAndRebootWS
Description
Section titled “Description”Asks the logged-on user to log off because the computer must restart to complete the installation. The message has a Yes and a No button.
- If the user clicks Yes, the user is logged off and the function requests a reboot with Job_RebootWS.
- If no user is logged on, the function requests the reboot right away.
- If the user clicks No, no reboot is requested and the script continues. Job_InstallationCompleted then doesn’t show its message.
To make No the default button, set gbLogoffUserDefaultNo to TRUE before you call the function.
Like Job_RebootWS, the reboot only works in computer jobs.
Syntax
Section titled “Syntax”Job_LogOffUserAndRebootWS(sText) As Boolean
Parameters
Section titled “Parameters”sText (String)
Section titled “sText (String)”Message for the end user. If sText is empty, the job name is used, followed by a standard text that says the job has been installed. If you pass exactly the job name, the standard text is added as well.
Example
Section titled “Example”If bStatus Then bStatus = Job_LogOffUserAndRebootWS("You will now be logged of and your Computer will be rebooted")