Skip to content

Sys_LogOffUser

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.

Sys_LogOffUser() As Boolean

The function returns False if Explorer is still running after InfoCenter has logged off the user.

If bStatus Then bStatus = Sys_LogOffUser()

Scripting Guidelines

Sys_UserLoggedOn Constants Package Property Variables