Lock an idle Windows session without Screen Saver

5

3

Is there a way to set a Windows system to lock (as if Win+L had been pressed) an idle session without using a screen saver?

I'm looking for answers compatible with Windows XP and above. I'd rather not use Task Scheduler if there is a local group policy or other setting that can be used instead.

Iszi

Posted 2012-05-24T16:11:34.790

Reputation: 11 686

Answers

14

Open your screensaver properties. Change the screensaver to "None", select "On resume, display logon screen" and then set the "Wait:" time to your desired idle time.

This does not engage the screensave, rather goes directly to the logon screen as if you just locked it using Win + L.

enter image description here

CharlieRB

Posted 2012-05-24T16:11:34.790

Reputation: 21 303

He specifically asked for a solution without screen savers. Otherwise: http://superuser.com/questions/167054/lock-your-computer-after-5-minutes-of-inactivity

– Der Hochstapler – 2012-05-24T16:45:01.603

2This doesn't use screensaver (notice None selected). It doesn't say not to use the interface which invokes it. Yes that answer is similar, but not the same. Mine specifically does not use a screensaver. – CharlieRB – 2012-05-24T16:51:34.823

1You're right. Sorry, my mistake. – Der Hochstapler – 2012-05-24T16:51:57.710

2@OliverSalzburg While this does use the "screen saver" function, it does not use an actual screensaver. Absent any other solution that doesn't require a scheduled task, I'm inclined to go in this direction. I didn't know that the "display logon screen" option was available with the "None" option selected. – Iszi – 2012-05-24T16:52:16.320

This works, but I've not had it working before even though I had the relevant settings set. I had to unset, Apply and set, Apply the settings again to get it to work. Or I haven't noticed it before. BTW, the screen goes black for about 2 seconds before the lock screen is shown. Again BTW, this is a Windows 7 and above feature. Windows Vista and below still requires a screensaver to be set. You can use the "Blank" screensaver if nothing fancy is desired. – ADTC – 2014-06-10T08:57:28.117

6

  1. Go into C:\Windows
  2. Create a new shortcut
  3. Paste this in the path: %windir%\System32\rundll32.exe user32.dll,LockWorkStation.
  4. Click next and rename it, click finish.
  5. Then Control Panel
  6. Scheduled Tasks
  7. Add Scheduled Task.Give some Proper name.
  8. Next/Browse
  9. Find the new shortcut, select it, pick daily, next.
  10. Type in a password for the Scheduled
  11. Task/Confirm, Next, Finish
  12. Double click the new scheduled task you just made
  13. Schedule Tab
  14. Schedule Task
  15. Select when Idle, enter time allotment, ok.

    Reference

Kunal Shivalkar

Posted 2012-05-24T16:11:34.790

Reputation: 346

Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference.

– Sathyajith Bhat – 2012-05-24T16:18:59.970

2voted down? hmm.. First of all I am very much new on superuser. but i have seen many answers on superuser which just points to another sites those contains good solution. If you want me to post whole solution,i will edit it. But voted down makes an impression that answer is useless or complicity wrong ?? isn't it ? – Kunal Shivalkar – 2012-05-24T16:36:09.820

3@KunalShivalkar, don't get discouraged. I went through the same thing when I first started. The idea of Superuser is for us to share our experience in order to help, not just link to what we find. Linking is great for support of your answer, but not so good as the answer alone. – CharlieRB – 2012-05-24T16:48:39.943

@CharlieRB : Thanks for your advice. i will take care of this from next time :) – Kunal Shivalkar – 2012-05-24T16:57:52.203

1Thanks for the info but, as I said in the question, I'd rather avoid using Task Scheduler for this. – Iszi – 2012-05-24T18:33:02.807

@IsziRoryorIsznti : I would also recommend you to follow to CharlieRB's solution.its better than mine.I will delete my answer bcoz it doesn't suit to ur question. – Kunal Shivalkar – 2012-05-24T19:02:29.867

2@Kunal: Don't delete your answer. It might help someone in the future. – indiv – 2012-05-24T19:19:53.530

1Couldn't the OP just do the first four steps and end up with a shortcut that when invoked locked the workstation? Using the task scheduler is not necessary. – martineau – 2012-05-24T20:30:29.350

@martineau I'm looking for an idle timer lockout. Something that doesn't require user interaction, because the user is presumably not present. – Iszi – 2012-07-12T20:41:51.207

@Iszi: Thanks for the clarification, obviously I didn't understand that from question's content itself. – martineau – 2012-07-13T00:05:20.157

We have a situation where the Group Policy locks the computer in 45 minutes and this is not editable. So, the only way I could think of making the lock workstation shorter was to use the Task Scheduler method. – Sun – 2014-05-22T16:19:04.357