1

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).

warren
  • 10,322

3 Answers3

5

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.

Gareth
  • 19,080
David Webb
  • 12,294
1

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'.

Alan B
  • 337
0

The two previous answers explain how to execute scripts on startup/shutdown.

The answer to the actual question asked (logon/logoff) is to create a windows task scheduler task where you tie the trigger to be "On connect/disconnect from user session" instead of a more familiar scheduled time or date.

Run taskschd.msc --> create task --> Triggers --> New --> "On connection to user session" ...

Otto
  • 1