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

Is there any difference if I log in as:

  1. username
  2. computername\username
  3. remote\username
  4. domainname\username
  5. something\username

I want my computer to behave differently depending how I log in. Is there a simple way to recognize different login methods?

Especially I want to restrict remote logins when someone else is logged in so the behavior should be changed before the logging in happens (a script on background checking login attempts perhaps?).

This should work on win 7 and win xp (not necessary exactly the same).

Relevant question: How to prevent remote desktop login when user is logged in locally?

share|improve this question
up vote 0 down vote accepted

You basically you only have the following options:

  • LocalComputer\Username
  • Domain\Username
  • Name@DNSDomain (SPN login)

In Windows 7, Windows by default assumes the domain the computer is joined in and adds the Domain\ part for you. This means it's again the second option.

(I don't know what you mean with Remote\username or something\username? Are these domains?)

At the end, the user is logged in with either a domain account or a local account, regardless with syntax he has used.

If only this one computer should act differently depending who is currently active, you could use a script in Startup and check the environment variable %USERDOMAIN% (will contain either the name of your domain, or the name of the local PC).

For a domain account, you might also use a Group Policy Object and add the script there. Giving only this one user access to the GPO would result that only this user (but on any computer) will have the configured script executed.

share|improve this answer

You must log in to answer this question.

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