This tiny C utility drives the ExitWindows/ExitWindowsEx and SetSystemPowerState APIs and makes the User able to quit the current Windows session from command line.
It aims to be a replacement for the shell's standard point-and-click functions.
It is compatible with Windows 9x, NT, XP and Vista+.
See inside BUILD.BAT about the different files to compile and link for the different target OSes.
The code is given to the Public Domain.