Sys_LogOffUser
Description
Section titled “Description”Logs off the user who is logged on to the computer. A user is logged on if Explorer (explorer.exe) is running. If no user is logged on, the function writes this to the package log and returns True.
If CapaInstaller InfoCenter is running, the function asks InfoCenter to log off the user. It then waits until the user is logged off, that is until Explorer has ended and the user’s registry hive is unloaded, for up to about 2 minutes.
If InfoCenter isn’t running, the function asks Windows to log off the user and doesn’t wait.
Syntax
Section titled “Syntax”Sys_LogOffUser() As Boolean
Return value
Section titled “Return value”The function returns False if Explorer is still running after InfoCenter has logged off the user.
Example
Section titled “Example”If bStatus Then bStatus = Sys_LogOffUser()