C++ and STL
  Common Issues
  Destructor
  regex
  string
 MFC
  CButton
  CDialog
  CEdit
  CInternetSession
  CWinThread
  CWnd
 MS VS FAQ
  Compiling, building
  Debugging
  Editor
  Settings
 Win32, API
  Console
  File System
  Graphics
  Internet functions
  Kernel objects
  Security
  Sound
  Thread, process
  Window
 Windows NT/2K*
  Logon, logoff...
  Networking
  Service Packs
 | About
  About
  Links & Freeware

Powered by
CoderTown



Reboot, logoff utility

Once I have wrote a simple helper utility for Windows to perform all these actions from command line or batch file. Plain API used. Here is its output. With empty command line parameters it does nothing but displays a help:

Usage: reboot [-option1] [-option2]
Option1:
        logoff
        poweroff
        reboot
        shutdown
Option2:
        force
Default: reboot
Expample: reboot -reboot

There is something similar in the net and MS Resource Kit, but I prefer mine.

Created: 2003-06-06
Updated: 2003-06-06

Google
 
Web visualcpp.net
msdn.microsoft.com codeguru.com