Auto Logon AND auto lock workstation?

  • Thread starter Thread starter John Dalberg
  • Start date Start date
J

John Dalberg

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?

Tony Dalberg
 
John Dalberg said:
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]
 
WTC said:
John Dalberg said:
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?

Tony Dalberg
 
John Dalberg said:
WTC said:
John Dalberg said:
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"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top