"John Dalberg" <(E-Mail Removed)> wrote in message
news:20061108184107.410$(E-Mail Removed)...
> "WTC" <bcrawfordjr(remove)@hotmail.com> wrote:
>> "John Dalberg" <(E-Mail Removed)> wrote in message
>> news:20061107201909.341$(E-Mail Removed)...
>> > 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]
>
> Thanks. Right now it starts loading the apps then locks the computer. Is
> there a way to make it lock first? Does the sequence of the keys in the
> run
> entry matter?
>
You're welcome.
You cannot tell what entries to start first with the Windows XP registry.
There are third party apps that can do this for you which you can google
for.
Another way is to create a batch file with all the Run entries commands for
the Current User in the batch file. Once you have created the batch file,
then delete all Run entries in the registry for the Current User. Then
create one registry entry that will start the batch file in the Run entries
for the current user.
Example Batch File
--------
@echo off
START /wait "c:\autolock.cmd"
START /wait "c:\program files\program1.exe" /switch
START /wait "c:\program fils\program2.exe"
--------
--
William Crawford
MS-MVP Windows Shell/User
|