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.

{ 8 comments… read them below or add one }
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.
Brilliant, thanks very much.
Really helpful, it worked for me. Thanks
Hey Friend it’s Mind blowing salutation. U rocked.
Thanks a lot, very good trick
I have a habbit of walking out without locking the PC, hence I did this…
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.
Thanks dear……………it really works. Kindly share and introduce more tips like this.