Skip to content

Job_LogoffUserAndRebootWS

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.

Job_LogOffUserAndRebootWS(sText) As Boolean

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.

If bStatus Then bStatus = Job_LogOffUserAndRebootWS("You will now be logged of and your Computer will be rebooted")

Scripting Guidelines

Job_RebootWS Constants Package Property Variables