≡ Menu

How to lock Windows XP when Idle

Go to Start –> Control Panel

Open up Scheduled Tasks

Click on File –> New –> Scheduled Tasks

Name it whatever you like, I named it Auto Lock

Open up Auto Lock Under the Task Tab, add the following to the Run: Textbox

%windir%\system32\rundll32.exe user32.dll, LockWorkStation

Click on the Schedule Tab

Under Schedule Task: drop down menu, select When Idle

On the Schedule Task When Idle option, set an appropriate Idle time, I set it as 10 Minute(s)

Click Apply, and you will have a popup to add password. Type in the password and confirm it. (I use the same password as my XP login password)

That’s it, It should auto lock your PC after it reaches the set idle time.

Comments on this entry are closed.

  • http://www.nish.com Nish Vamadevan

    Try the same password as the login password… That's what I tried and it worked…

    You will get this error, if you use a password other than your own Login Password.

  • Carl Hungus

    Brilliant, thanks very much.

  • Carl Hungus

    Brilliant, thanks very much.

  • NADEEM

    Really helpful, it worked for me. Thanks

  • NADEEM

    Really helpful, it worked for me. Thanks

  • Rajeev Ranjan

    Hey Friend it’s Mind blowing salutation. U rocked.

  • E

    Thanks a lot, very good trick

    • http://www.nish.com Nish Vamadevan

      I have a habbit of walking out without locking the PC, hence I did this… :)

  • http://www.considerit.co.uk Edinburgh IT Support

    Nice one – a few of our clients were asking for this and this is a good work-around for machines that aren't on a Domain.

  • Wajid Iftikhar

    Thanks dear……………it really works. Kindly share and introduce more tips like this.

  • Wajid Iftikhar

    Thanks dear……………it really works. Kindly share and introduce more tips like this.

  • Duri

    Hey Thx

    This works BUT our workstation prompts a new password every 30 days… if we put in our new password will this automatically update to the new password?

    • http://www.nish.com Nish Vamadevan

      Duri,

      It is nothing to do with password, You got to enter the right password for your account.

      • Balaviswanathan

        Nish,
        So do we need to enter the password that was used at the time of creating the lock schedule even if we change the system password?

        • http://www.nish.com Nish Vamadevan

          Balaviswanathan, System password should work.

  • Chetan

    thanx a lot it really helped

  • http://www.facebook.com/rajeshpblm Rajesh Kr

    Thank you very much…. 

  • http://www.facebook.com/jeffjpelletier Jeff Pelletier

    This can be expanded with group policy..

    In Group Policy, navigate to User
    ConfigurationPreferencesControl Panel SettingsScheduled Tasks and
    then create a new task called “Lock When Idle” or whatever. (note the
    LockWorkStation is case sensitive)

    (Task Tab)
    Action should be Update

    Run: rundll32.exe
    Arguments: user32.dll, LockWorkStation

    (Schedule Tab)
    Scheduled Task: When Idle
    Start Time: blank (should be grayed out)
    When the computer has been idle for : 30 minute(s) (or whatever idle time you want)

    (Settings Tab)
    Uncheck it all

    (Common Tab)
    Uncheck it all

    Apply this policy to the users you want to lock. Alternately you can
    apply it to workstations and enable Group Policy Loopback Processing for
    this policy as I did so that it is not assigned to servers when ever
    someone logs in to one.

  • Satty(INDIA)

    Just Do it in simpler way :

    Click on Check Box and System will be locked as per Wait minutes.

  • Satty(INDIA)

    Just Do it in simpler way :

    Click on Check Box and System will be locked as per Wait minutes.

     

  • loloyd

    This is the closest thing I could come up with without changing my screen saver policy (as I like it the way it is). I want to auto-lock my home PC via customizable timer as I leave it going to work. I would like to develop a simple program or script much like the on-demand shutdown command via command prompt (see “shutdown -?” in a DOS-box or command prompt – I am interested in the “-t” switch). I want to change the timer setting on a per-use basis, not as a blanket policy that I have to change via several mouse clicks every single time. “%windir%system32rundll32.exe user32.dll, LockWorkStation” is what I need. Thanks.

Next post:

Previous post: