Add to Technorati Favorites Add to Google

How to automatically login to Windows and then lock the workstation

How to automatically login to Windows and then lock the workstation?

Although it may sound unnecessary, this is one of the frequently asked questions asked in the the Newsgroups and forums all over the web. Here is one such 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


BOOKMARK THIS PAGE

BlinkList | del.icio.us | Digg it | Furl | ma.gnolia | Newsvine | reddit | Spurl | Wink |


If you enjoyed this post, make sure you subscribe to our RSS feed! We feature Tips, Troubleshooting information, Scripts and Utilities for Microsoft Windows Operating Systems!
Prefer an E-mail subscription?

Enter your email address:

Delivered by FeedBurner

Post a Response