1

I am sure everyone knows about the common functionality of automatic login on Windows.

What I would like is the same thing, but in background; meaning that the user selection screen remains on display while the profile for the specified user is being loaded.

Is it possible? Or is there a script to do it?

2
  • Why is it that you're trying to do this? It may be that whatever you're trying to do is better suited to running as a service or some other scenario.
    – nhinkle
    Nov 13, 2010 at 8:42
  • Actually, that was what I needed when I had only one program to run like this; and I was actually able to launch it as a service, and access it through the Web interface available. However, I now need other programs to run, and they cannot run in background. When they are launched they just minimize to the tray.
    – Yusuf
    Nov 15, 2010 at 5:49

2 Answers 2

2

It's kind of irritating, but you can create a shortcut in the auto-login account's Startup folder which launches the command:

rundll32.exe user32.dll, LockWorkStation

The computer will log in and eventually launch this shortcut, locking the screen. This will happen every time the account logs in, even if the login was initiated manually.

3
  • But this means I would not be able to login at all when I actually want to use the desktop, right?
    – Yusuf
    Nov 15, 2010 at 5:48
  • The programs in Startup only get called on logon. When logging on, either manually or via auto-logon, the screen would start loading, then lock once that shortcut was called. Then when you unlocked the desktop, since the account was already logged on, it would not call the shortcut again and you could use the desktop as normal. Nov 15, 2010 at 10:16
  • ah ok; that's fine with me; so I guess I'll be going along this solution
    – Yusuf
    Nov 16, 2010 at 9:34
1

On XP the task scheduler didn't look like it was going to run the arguments contained in the shortcut, rather only the rundll32.dll the shortcut pointed to instead.

If this happens in your case make a notepad document and save it as a .cmd file, which contains this inside, and schedule that instead.


@echo off

start %windir%\system32\rundll32.exe user32.dll, LockWorkStation && exit


This way an app like Task Scheduler won't traverse the shortcut and just use the app it points to, leaving behind the arguments contained in the shortcut.

8
  • That would almost the same as Stephen's solution, or am I missing something?
    – Yusuf
    Nov 15, 2010 at 5:51
  • In XP Home 32, when I pointed Task Scheduler to the shortcut (.lnk file) I had created it followed it along to the executable it pointed to, leaving behind the arguments the shortcut was passing to the executable. Pointing Task Scheduler to the .cmd file runs the .cmd file. Task Scheduler ends there, it doesn't keep going to where the command refers it to, as it did with the .lnk file. This way it doesn't bypass the arguments contained within, rather runs the executable and the arguments defined by the command.
    – NginUS
    Nov 15, 2010 at 16:43
  • ah ok, I got your point; I'll try it simply as Stephen explained, then if it does not work, I'll use yours. At least I already have an answer to a question that I could be asking :D
    – Yusuf
    Nov 16, 2010 at 9:36
  • 1
    There's another function of the Task Scheduler that has a similar effect to what these solutions do, yet subtly different. And that's the ability to schedule an application to run at startup, as a user. What this does is has an application run as if that user was logged on- as soon as the computer starts and reaches the login screen. The same login screen we're automatically logging in through then re-establishing with the lock command. Except in our case now we have all that user's startup apps going rather than just one being set to go at startup. I don't know if that might be another way.
    – NginUS
    Nov 18, 2010 at 1:28
  • oh!! that seems to be really interesting, indeed. I'll have to look into that.. or if you have more info, i'd really like to know more!!
    – Yusuf
    Nov 22, 2010 at 6:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .