Novell is now a part of Micro Focus

How to make Win2K "Lock" after Period of Inactivity

Novell Cool Solutions: Trench
By Paul Behrens

Digg This - Slashdot This

Posted: 5 Nov 2002

Here's an idea for you on Win2K. We use this to lock the workstation after five minutes of idle time:

(Start a snAppShot on a workstation to capture these changes for distribution)

  1. Go to Control Panel - Scheduled Tasks
  2. Click "Add Scheduled Task"
  3. For the program location click browse and use:
  4. Choose "Daily" and press Next.
  5. Set the Start Time to 12:01 AM
  6. Click "Every 1 Days" and click Next.
  7. Enter the Administrator username and password and click Next.
  8. Click Finish.
  9. Now double click on the item to open it back up again. Change the path to:
    C:\WINNT\System32\rundll32.exe user32.dll,LockWorkStation
  10. Click on the Schedule tab.
  11. Click on the Advanced button.
  12. Choose "Repeat this task every (7) minutes for duration (24) hours."
  13. Click on the Settings tab and select "Only start this task if the computer is idle for (5) minutes" and "retry for up to (6) minutes"
  14. Uncheck everthing in the Power Mangement section.
  15. Check the "multiple schedules" box.
  16. Click "New"
  17. Change to "At Logon".
  18. Press OK to save your changes.

Now if the computer is idle for five minutes, it should lock the workstation. If you wanted it to log off instead, use Shell32.dll,ExitWindowsEx.

If you have any questions you may contact Paul at

Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions.

© Copyright Micro Focus or one of its affiliates