ALNMOO
asked on
logoff command - C++ console
hi experts,
What is the command to logoff current account in windwos XP?
What is the command to logoff current account in windwos XP?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
to use the shell command you can use
ShellExecute(NULL, "open" "shutdown.exe", "-l", 0, SW_SHOW);
ShellExecute(NULL, "open" "shutdown.exe", "-l", 0, SW_SHOW);
ASKER
This what is worked with me:
ExitWindowsEx(EWX_LOGOFF | EWX_FORCE, 0);
ExitWindowsEx(EWX_LOGOFF | EWX_FORCE, 0);
shutdown -l
(thats an L btw..)