Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm looking for a way to have my PC boot into Windows 7, auto login with an administrator load some software that needs to run as admin, then do a switch user and login with a guest account with less privileges.

I've thought of using a command line to lock the PC which will take it to the switch users screen, but what I really need, is for it to actually switch to a specified user.

Any ideas?

share|improve this question
    
Have you tried the runas command-line utility? I guess that still exists under Windows 7? You could call it from a batch file to launch the software under the admin account, from within your 'normal' account. –  onnodb Nov 23 '09 at 20:01
    
It's also important to hide this application from the guests, don't want them messing around it. Thanks though. –  zimmer62 Nov 23 '09 at 22:33
    
consider a reverse approach. i have a 7 box where i am (for various reasons) using the built-in administrator account without UAC. as a precaution i'm using trusty old DropMyRights (making use of the "CreateRestrictedToken" function), it was written for XP but works just as well with Vista/7, so i have full admin access yet i can run all critical application with reduced privileges. of course this works for any account with admin privileges (warning: this is totally unsound, irresponsible and insane computing practice, don't try this at home kids! :) –  Molly7244 Nov 27 '09 at 23:51
add comment

2 Answers

It would probably be much better and easier to create a service that runs the necessary software at boot time. What you propose is rather insecure and could be prone to trouble.

You could auto-login the guest account, if necessary. A boot-time service will start/run regardless of whether or not a user logs in.

share|improve this answer
    
I realize it's not ideal for security. The main problem is that the application in question does not run very well as a service. It relies on a few things that just can't work as a service. TTS using the systems sound card and a modem driver that I can think of. Either way, running it as a service isn't going to work, and I understand the security implications. It's going to be running on a machine in my house that guests might use, but most of the time it'll be me or a family member. –  zimmer62 Nov 23 '09 at 18:49
add comment

You can use the task scheduler to create a task that will run on startup as a specific user.

To do so:

  1. Open the Task Scheduler

    • Control Panel
    • System And Security
    • Administrative Tools
    • Task Scheduler
  2. Create a new task

    • Actions
    • Create Task...
  3. Fill in the name and description

  4. In security settings, select the proper user, and "Run whether the user is logged in or not". If you need full privileges, check "Run with highest privileges"

  5. In Triggers, create a new trigger for "At startup"

  6. In Actions, add in all your programs that you want to boot automatically.

  7. Make sure the Conditions and Settings are set to your liking.

After, you can simply set your computer to auto-login as the guest account using control userpasswords2 or via the registry. Restart the computer, and you are done.

share|improve this answer
    
I like this idea, and your description of it. I do have to ask if you would be able to interact with the application when you DO want to. For example, sometimes I do actually need to RDP to this computer as the Admin user, and change settings on this software. I'll give it a shot, but I'm suspecting this approach will be similar to running software as a service, and that you lose all GUI interaction with the running process at this point? –  zimmer62 Nov 28 '09 at 20:51
1  
Nothing stops you from starting the application manually and changing the settings. They will take effect the next time the task is run. –  Andrew Moore Jan 13 '10 at 14:34
add comment

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.