Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Auto-login, auto-lock?

Posted on 2001-09-06
10
Medium Priority
?
19,841 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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 800 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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying 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

This article helps those who get the 0xc004d307 error when trying to rearm (reset the license) Office 2013 in a Virtual Desktop Infrastructure (VDI) and/or those trying to prep the master image for Microsoft Key Management (KMS) activation. (i.e.- C…
Sometimes clients can lose connectivity with the Lotus Notes Domino Server, but there's not always an obvious answer as to why it happens.   Read this article to follow one of the first experiences I had with Lotus Notes on a client's machine, my…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

876 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