Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to run a command as an administrator. So I use runas command. And I want to specify the user using @ character.

Is that possible as the computer (Windows7) is not part of any domain?

> runas /noprofile /user:mymachine\administrator cmd
> runas /profile /env /user:mydomain\admin "mmc %windir%\system32\dsa.msc"
> runas /env / "notepad \"my file.txt\""

I tried

  • administrator@computer_name
  • administrator@workgroup
  • administrator@our_company_name
  • administrator@computers_ip

and nothing worked. computer_name\administrator works ok.

share|improve this question
up vote 2 down vote accepted

This syntax is not available for non-domain user accounts. You must use the computer\username syntax for local user accounts.

The name@domain syntax is a User Principal Name. This is a feature of Active Directory; it used for specifying user accounts within a domain. It is not available for local user accounts since there is no associated domain suffix.

I've looked for documentation specifying this, but the best I can find is this, which says:

In a Windows 2000 domain, an account can have a user principal name in addition to its SAM account name.

Implicitly, this means that workgroup accounts do not have UPNs.

share|improve this answer
Great, thank you for the explanation. I thought it would be the case but hoped not to be :-) – Radek Oct 15 '12 at 5:01

So why not just use computer_name\administrator?

This is standard convention and you may look into your environmental variables if this is an itch your can't scratch.

share|improve this answer

You must log in to answer this question.

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