With XP and 2k(3) servers you can define startup, login, logoff and shutdown scripts via GPO's.
- startup scripts run when computer boots ( before the CTRL-ALT-DEL dialog.
- login scripts run at user login.
- logoff scripts run at user logoff.
- shutdown scripts run when shutting down the computer, after the logoff script.