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.

My user account is an administrator account (well in the Administrator group technically). As I understand this I am always running in the standard user context except when elevation is required, which a UAC dialog allos/disallows.

My actual Administrator account on this machine is disabled and I would like to keep it disabled for security reasons.

The question then is how do I use RUNAS to launch a process with elevated privileges? It seems like the only argument used for elevation is the actual user name. How can I spawn a process within a command line with elevated privileges then if I don't have an Administrator account username to supply to RUNAS.

Maybe this isn't possible. If that is the case, that's fine, but what I'm not interested in is:

  • Running cmd.exe as an administrator (neither through shift-click, right click option, or permanent flagging)
  • A third party program like sudo or elevate.
  • Creating another user account that is an explicit Administrator or renaming the Administrator account.
share|improve this question

1 Answer 1

Your account can do anything the base Administrator account can do. That's what being a member of the Administrators group means. You just have to elevate your own account for a specific action before it will use those powers. When you see a prompt (perhaps on the context menu) that says "Run as Administrator", it's still using your account to do whatever task you run.

share|improve this answer
1  
+1 I was just going to post the same, but let me add (for the questioner) that just because you normally run as an administrator restrained by UAC, that does not mean that when you enter your user in Run as, it will be similarly restrained. –  KCotreau Jul 8 '11 at 13:48
    
Right, best as I can tell RUNAS doesn't elevate privileges, rather makes me a different user. Does that mean if I did have an explicit Administrator account, even using RUNAS would default to using the Administrator account in its standard context, or is the "Administrator" account different in any way? –  mindless.panda Jul 8 '11 at 14:24
    
@mindless - I think we're talking about different RUNAS features. In Windows xp and earlier, the built in feature allowed you to pretend to be someone else. In Windows Vista/7, the built in feature just elevates the rights for your existing account, but only if you're in the right group. And it sounds like you might even be talking about a third party add-on, as there's nothing in Windows called "RUNAS" (all one work, caps) –  Joel Coehoorn Jul 8 '11 at 15:44
    
@ Joel Coehoorn. The built in feature is UAC, which give individual programs admin access, rather than give all programs running under the user. There is a RUNAS command, BTW. –  surfasb Jul 9 '11 at 8:00
    
@mindless. If you just hit the UAC prompt, it will amount to running the program under the Admin account. The results are the same. Keep in mind, you won't see this UAC prompt when you run under the builtin Admin account, because it is explicitly configured to auto answer those prompts. You can do that to, but it is heavily advised that you don't. –  surfasb Jul 9 '11 at 8:02

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.