Solved

Auto-login, auto-lock?

Posted on 2001-09-06
10
19,819 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 34

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
 
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 34

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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
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 34

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 34

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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

A Bare Metal Image backup allows for the restore of an entire system to a similar or dissimilar hardware. They are highly useful for migrations and disaster recovery. Bare Metal Image backups support Full and Incremental backups. Differential backup…
Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

760 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now