A reader asks if it’s possible to automatically login to Windows and then lock the workstation immediately. Here is a legitimate case where it’s required.

"The IT department has begun pushing out periodic Automated Updates overnight which subsequently reboot my workstation. The negative result of this process is my scheduled tasks, which require my network credentials, fail because I am no longer logged into the network when the task is scheduled to run. I leave my workstation logged in and locked (for security) when unattended."

First, you must setup automatic logon to your user account. Secondly, place a script in the Startup folder that’ll lock the workstation after logging on. Microsoft MVP Mitch Tulloch’s Tip Locking a desktop at logon tells you how to lock the workstation after logging on, using the following command:

rundll32.exe user32.dll,LockWorkStation

Whereas in Windows Vista (and Windows XP), you can place a shortcut to tsdiscon.exe in the Startup folder, and have it lock the workstation for you at startup. The common Startup folder is located here:

In Windows XP

C:\Windows\All Users\Start Menu\Programs\Startup

In Windows Vista

C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup

Related Posts


Email SubscriptionPrefer an E-mail subscription?

Enter your email address:

Delivered by FeedBurner

Leave a Reply