Create a logoff script/task for Windows

Without using AD GPOs (Active Directory Group Policy Objects), or similar, how would one go about creating a logoff script for Windows?

This would be for XP (home and pro), Vista, and 7, in a personal environment (ie, no Domain Controllers anywhere in sight).


In the Run box type gpedit.msc and hit enter. This will open the Group Policy editor. This will allow you to edit the kind of things normally managed by an AD Policy directly on the local machine.

alt text

Under Windows Settings there is a Scripts (Startup/Shutdown) option where you can specify Startup and Shutdown scripts.


On Windows XP Pro, you can assign startup and shutdown scripts (i.e. batch files) using Group Policy. Open the Help And Support Center and search on 'shutdown script'.