Re: Auto Logon AND auto lock workstation?

Tech-Archive recommends: Fix windows errors by optimizing your registry



"John Dalberg" <nospam@xxxxxxxxxx> wrote in message
news:20061107201909.341$pt@xxxxxxxxxxxxxxxxx
Sometimes I need to restart my computer and load all my apps
after I log in. However the whole process takes at least 5 minutes.

I would like to start a restart and leave my desk and come back
and have all my apps loaded automatically. I have my apps set up
to auto start after I log in and I know how to set the computer to
auto log me in. The missing piece is how to get the computer to
lock itself as soon it logs me in so no one can use it while it's
loading my apps?

Create a batch file with the following contents:

------
@ECHO OFF

%windir%\system32\rundll32.exe user32.dll,LockWorkStation
-----

Name the batch file "autolock.cmd". Move the batch file to the "c:\documents
and settings\<YourUserName>\Start Menu\Programs\Startup" folder.

---

Another way is to create an entry in the Run section for the HKCU hive. You
would type the following into a Command Prompt window between the [ ] to add
the registry entry for the autolock entry.

[reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Run /v autolock /t
REG_SZ /d "%windir%\system32\rundll32.exe user32.dll,LockWorkStation"]

Then to delete the autolock entry in the registry, simply type the following
between the [ ]:

[reg delete HKCU\Software\Microsoft\Windows\CurrentVersion\Run /v autolock]

--
William Crawford
MS-MVP Windows Shell/User


.