rundll32 shell32.dll,SHExitWindowsEx 2 ..to reboot the computer, and..
rundll32 shell32.dll,SHExitWindowsEx ..to log off the current user (without the confirmation question). Those are for 9x (95, 98, Me). XP has shutdown.exe, also available in NT and 2k resource kits: %windir%\system32\shutdown.exe -r would be a reboot. Some useful attributes: -r = shuts down and restarts; -f = forces processes to terminate; -l = shuts down all running processes, then logs off; -s = shuts down to a point at which it is safe to turn off power; -h = help.
Also note the "-t xx" attribute. Default shutdown has a countdown of 30 seconds, with this you can change that ("-t 00" being zero). Undefined adds that XP also has "tsshutdn 0 /POWERDOWN" to put in target field for a shutdown and mentioned kill.exe. This tool is provided with 2k (tools dir on the cd), and "will kill every task running without warning, so it probably harms your system in some way or another. Don't do it unless you absolutely have to." Freely available online.
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.