I have used the following code to shutdown the system but it will perform logoff windows
Private Const EWX_LogOff = 0
Private Const EWX_SHUTDOWN = 1
Private Const EWX_REBOOT = 2
Private Const EWX_FORCE = 4
Public Declare Function ExitWindowsEx Lib "user32" (ByVal uFlags As Long, ByVal dwReserved As Long) As Long
Public Sub ShutDownComputer()
Call ExitWindowsEx(EWX_FORCE, &HFFFFFFFF)
End Sub