2

I am looking for a way to run a script1 when a user logs in2 AND and when they log out3 on their4 Windows5 machine.

Notes:

  1. Perfect world script would mean Powershell script, but any script or application would be acceptable.
  2. Log in can mean at machine start too, but user log in would be ideal.
  3. Log out can mean machine shutdown too, but user log out would be ideal.
  4. This machine is not on a domain.
  5. The Windows version is Windows Vista.
9

On a non domain machine you can edit the local machine policy to run scripts at startup and shut down (this may not work in Vista Home edition).

To access this go to start, run then enter gpedit.msc.

In here, expand the user configuration node, then windows settings, then you will find a scripts option where you can set the location of scripts to be run at logon and logoff.

enter image description here

3

Windows Vista's Task Scheduler also supports running scripts at those events.

http://technet.microsoft.com/en-us/appcompat/aa906020.aspx

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.