Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Auto-login, auto-lock?

Posted on 2001-09-06
10
19,832 Views
Last Modified: 2013-12-28
I have a couple of our WindowsNT application servers set to auto-login, but I would like to have them locked immediately when they reboot instead of waiting for the screen saver to lock the console.  Is that possible?
0
Comment
Question by:Mark Geerlings
  • 4
  • 2
  • 2
  • +2
10 Comments
 
LVL 2

Expert Comment

by:ThaiTran
ID: 6460791
It's confusing.  If you want to lock your computer after reboot why don't you remove auto-login feature. what different if you use auto-login and then lock it right away?  You still need to retype your password.
0
 
LVL 35

Author Comment

by:Mark Geerlings
ID: 6460812
I need the server to auto-login to be able to run some applications that cannot run as services, but need to be running if/when the server is ever rebooted.  I'm not at work around the clock, but if there is ever a power supply problem during the night or on a weekend, I need those applications running as soon as the server restarts, whether I am there or not.  I would just like to know though that if others are in the room when it reboots, they don't get easy access to the console.
0
 
LVL 1

Expert Comment

by:forenzixbe
ID: 6460881
make a shortcut in the startup folder on your system with the following target.

rundll32 user32.dll,LockWorkStation


this will lock your screen on startup.

Cheers,

Forenzix.
0
Portable, direct connect server access

The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

 
LVL 1

Expert Comment

by:forenzixbe
ID: 6460898
damn ... sorry, that is for win2K only ....
for NT you need to do the following :
---------------------------------------------------------
Windows NT 4.0
There is no solution to lock a Windows NT 4.0-based workstation from the command line. You can, however, achieve a similar effect with some additional configuration.

In Windows NT 4.0, you can use the SendMessage call to send a SC_SCREENSAVE message to the topmost window, which locks the workstation if the current user has a screen saver configured and the screen saver is configured to require a password.

To ensure that a screen saver is configured, you can create registry entries. Run a registry (.reg) file that adds the following entries from the command line:
HKCU\Control Panel\Desktop\ScreenSaveActive = 1
HKCU\Control Panel\Desktop\ScreenSaverIsSecure = 1
HKCU\Control Panel\Desktop\ScreenSaveTimeout = timeout in seconds
HKCU\Control Panel\Desktop\SCRNSAVE.EXE = %SystemRoot%\System32\Appropriate screen saver.scr
Some screen savers require additional parameters in HKCU\Control Panel\Screen Saver.screen saver name as well.

After you create these registry entries, the following call invokes the screen saver:
SendMessage(HWND_TOPMOST, WM_SYSCOMMAND, SC_SCREENSAVE, 0)
You must write and compile a short program (.exe file) that contains this call. You can then call your program from the command line to activate the screen saver. Because the ScreenSaverIsSecure value in the registry has been set to 1, this has the effect of locking the workstation.
---------------------------------------------------------
0
 
LVL 35

Author Comment

by:Mark Geerlings
ID: 6460994
Thanks for the responses, forenzixbe.

I had tried the rundll32 approach and got an error, "missing entry: LockWorkStation".  I will keep that tip though for when we move to Windows2000 - maybe later this year.

I don't have a C compiler (or any other way to make an *.exe file), but I do know someone who does, so if there is no other way I may ask him to help me.

I'll reject your answer for now, but if no one has anything better, I'll accept it later.
0
 
LVL 10

Accepted Solution

by:
Longbow earned 200 total points
ID: 6463504
Resource Kit Tool.
A doc file is included if i remember well.


The AutoExNT Service allows you to start a custom batch file, Autoexnt.bat, when you start a computer - without having to log onto the computer on which it will run.

AutoExNT includes an /interactive option (analogous to the /interactive option of the AT command) that allows you to see the processes started. To use AutoExNT, you must be running Microsoft? Windows? 2000, Microsoft? Windows NT? version 4.0, or Microsoft? Windows NT? 3.5 or later.

As no user-environment variables have yet been declared when AutoExNT runs at system startup, you must use full path names. If you need a service to be running, such as the Server or Schedule service, include a net start service command at the beginning of your Autoexnt.bat file before you start running a dependent process.

0
 
LVL 35

Author Comment

by:Mark Geerlings
ID: 6470556
Thank you, Longbow - that looks like the solution I was hoping for.  I've had a couple other problems I've had to deal with first.  I hope to try Autoexnt later today.
0
 
LVL 10

Expert Comment

by:Longbow
ID: 6471170
Waiting...
;-)
0
 
LVL 35

Author Comment

by:Mark Geerlings
ID: 6472020
That works great!  Thank you.
0
 

Expert Comment

by:The_Celt
ID: 10148225
I know this post is old, but I needed the same solution, and I found one. If you use PCAnywhere, set it up to autostart, and lock the workstation on startup, and on any kind of disconnection under the settings tab. I tried it using sysinternals autologon from a restart and a full power cycle.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Computer account cleanup 90 128
How to set only one user access in one machine in windows 3 35
Auto-launch VPN via Wifi 7 49
Windows 10, Hotmail and AdChoices 7 14
Recently Microsoft released a brand new function called CONCAT. It's supposed to replace its predecessor CONCATENATE. But how does it work? And what's new? In this article, we take a closer look at all of this - we even included an exercise file for…
If you get continual lockouts after changing your Active Directory password, there are several possible reasons.  Two of the most common are using other devices to access your email and stored passwords in the credential manager of windows.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question