Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have an idea in my head of what I'd like from auto-login on Windows XP and was wondering if anyone could suggest how to achieve it.

The first problem is that my company throws up a dialog on the login screen on Ctrl-Alt-Del but before I login. It's just a typical "This is a private system" warning but I need to OK it to login. I think it's because of this that conventional auto-login via control userpasswords2 or SysInternals tool doesn't work.

Second of all, I run up a bunch of apps on login like Outlook, Eclipse and VMWare. I'd love to be able to hit the power button and go for coffee then come back to a machine that is running everything and all nicely warmed up. However, I don't want to leave my machine unlocked either. So (and here it gets aspirational) I'd love auto-login to proceed in the background having locked the PC immediately after login.

Is this possible?

Thanks, MK

EDIT:

Thanks for the responses! There are good solutions for part 2 here.

Concerning part 1, I have concluded that this policy has been set:

Local Policies -> Security Options -> 
"Interative logon: Message test for users attempting to logon"

This is the message I would like to OK automatically, otherwise my auto-login gets stuck. I realize I may be asking the impossible here, but what is corporate IT policy for if not to rail against?

Many thanks.

share|improve this question

8 Answers 8

up vote 3 down vote accepted

In addition to running a screensaver, you could also run the "lock screen" command as a startup batch file or scheduled task.

C:\WINDOWS\system32\rundll32.exe user32.dll,LockWorkStation
share|improve this answer
    
This answers part 2 of my question. I'm holding off closing the question for a bit in case anyone can solve my policy problem. Otherwise you're getting the tick. Thanks! –  user25631 Nov 10 '09 at 15:38
    
I added another answer for part 1. Happy hacking :) –  StuffMaster Nov 11 '09 at 17:34

Why don't you just leave the machine suspended or hibernated at night rather than fully logged out and shut down if this is the behavior you want? That way you wont be making any radical changes to the system's security policies and the resulting startup process will be much faster.

share|improve this answer
    
I find myself forced to reboot often enough for updates and such that I'd like to automate. I use your approach at home but find resuming from hibernation at work to be as painfully slow as starting afresh. Thanks. –  user25631 Nov 10 '09 at 15:37

How about launching the screen saver right away (auto launch an scr file) and password protecting it?

That way the programs continue to run/spin up even though the screen is effectively locked.

share|improve this answer

It is likely that you are subject to Group Policy that will prevent some or all of what you want. However, one thing I would try, just to see if it would work, would be to add a screen save to my Startup stuff and set it to timeout immediately and require a password.

share|improve this answer

I am following this method to lockout my session after login. Create a .reg file with the following contains and execute it.


REGEDIT4

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run] "lock"="rundll32.exe user32.dll,LockWorkStation"


This should work like charm.

Thanks

Harish B M

share|improve this answer

The security option setting that you mention re: "Interative logon: Message text for users attempting to logon" and its counterpart, "Interative logon: Message title for users attempting to logon" are what's stopping the "normal" autologon behavior of Winlogon from working.

You have two options:

  • Modify the code for Winlogon to prevent this dialog from interrupting the process (or, theoretically, write additional code that clicks the "OK" button for you).

  • Remove or prevent the registry values from being created (presumbly by Group Policy) that cause Winlogon to exhibit this behaviour.

I suspect that you'll find both equally impossible. End-running your IT policies re: the pre-logon text isn't something that I'll think you'll get a lot of support on here, either.

share|improve this answer

Here's something else I've done before on XP:

If the policy was set on the computer at installation (and not by Active Directory), you can change it by using a boot disc. Several Windows XP PE boot discs have registry editors for changing the machine's registry. If you don't know what keys to change, this procedure can help:

  1. Back up the entire registry in case something goes wrong.
  2. Boot the computer using a Windows boot disc .
  3. Use regedit to export the HKEY_LOCAL_MACHINE\SAM hive. This is the Security Accounts Manager info where passwords are stored. Note that the data here won't be visible when you are logged in normally (as any user).
  4. Use the boot disc to change the administrator password (I'm assuming you don't know it)
  5. Reboot, log in as the administrator, change all the local policies you want! Alterni
  6. Reboot with the boot disc. Import the SAM keys back into the machine's registry. You have now restored the administrator password without ever knowing it.

That sound you heard was a million sysadmins beginning to cry.

share|improve this answer
    
You made me laugh. I do actually have the local admin password and use a local account but I cannot alter the policy. The machine is a member of a domain so I expect this is the reason. Thanks! –  user25631 Nov 12 '09 at 11:07

My suggestion:

  1. Run VNC server as a service, accepting connections only from the localhost.
  2. Create a script to automate the RFB (VNC protocol) actions for logging in.
  3. Arrange to have the script run at an appropriate time during the startup process (this might be tricky to get right).

Would love to know if this works: I don't have a machine to test it on but I can't think of any reason why it wouldn't.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.