in WindowsXp č abbastanza semplice, esiste una utility di sistema per farlo: shutdown.exe nella cartella Windows/System32
ti basta creare un collegamento a shutdown.exe e poi puoi aggiungere i seguenti parametri:
-l (log off)
-u (shutdown)
-r (reboot)
-h (Hibernate)
-s (Stand By (Sleep)).
quindi se il collegamento č: shutdown.exe -u
il computer si spegnerą
puoi anche aggiungere un numero di secondi di attesa con un messaggio:
shutdown.exe -u -t 30 -c "il tuo testo"
http://www.budja.com/shutdown/readme.html