"Run As" On Vista/ Win7?

I miss the feature of using "Run As" on Vista and Win7. Because Run as administrator does not work in domain environments for many things.

Is there a way to do a "Run As" on Vista and Win7?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

JohnBusiness Consultant (Owner)Commented:
It should do. Right Click, Run as and then authenticate as required. It always works for me whether on a domain or not. Please enter appropriate userid and password and Run As will work. .... Thinkpads_User
Steven CarnahanNetwork ManagerCommented:
In some cases holding down the shift key and right clicking will give you the "Run As"
keep shift key pressed and right click the exe.. and select run as different user....
10 Tips to Protect Your Business from Ransomware

Did you know that ransomware is the most widespread, destructive malware in the world today? It accounts for 39% of all security breaches, with ransomware gangsters projected to make $11.5B in profits from online extortion by 2019.

I'm a bit curious, though.  On our domains we use Run as administrator rather extensively and never encounter situations where it "does not work ... for many things."  What type of problems have you seen?
JohnBusiness Consultant (Owner)Commented:
I have not had to do the shift key trick ever. You should get Run as with any right click.

Pancake_Effect - please let us know about my first post. ... Thinkpads_User
JohnBusiness Consultant (Owner)Commented:
Anuroopsundd  - Please read all the posts before posting the same things. Thank you.
Ashok DewanFreelancerCommented:
if you want then you can use commands
runas /user:administrator "programe name here or path to exe"
Thinkpads, on our Windows 7 Enterprise domain workstations the "Run as" option isn't available by default... you need to utilize the shift key trick.  Is it possible that your machines have the Sysinternals ShellRunas utility installed?
Pancake_EffectAuthor Commented:
The Shift + Right click works great for Win7

But it doesn't work with Vista, sadly we still have a few machines running that garbage OS on the domain still.

I've used the command neil40m provided before, but I'm hoping for something a little faster, or am I stuck with the CMD line with Vista?

Run5k - It simply just doesn't work when using "run as administrator" when I have to install programs for instance on a domain user account. If I do Run as with a different user, it works usually 100% of the time.

Now it just looks like Vista is the only one with the problem..
JohnBusiness Consultant (Owner)Commented:
No. They are standard Windows 7 machines. I will not see a domain connected machine until Wednesday, but I will check at that time and take a look. Also, I do not have any Enterprise machines, just Windws 7 Pro.

I do recall installing and enabling software on such machines, but I will take a look.

... Thinkpads_User
Pancake, that's rather unusual.  We use Run as administrator regularly on our domains and never have any issues.  Have you tried using a local admin account when you utilize it?

As for the Vista machines, you may want to consider using the handy Sysinternals utility that I just mentioned to Thinkpads...

Steven CarnahanNetwork ManagerCommented:
There was an article in WindowsITPro magazine back in 2007 that addressed the issue with Vista.

Pancake_EffectAuthor Commented:
When I click "Run as Administrator" on Vista machines on the Domain, it simply just opens the program up and runs it without asking for any credentials.
JohnBusiness Consultant (Owner)Commented:
On the Vista machines (or even the Windows 7 machines for that matter), do you have UAC disabled?  On Vista, UAC disabled can enable a program to run without asking for credentials.

.... Thinkpads_User
Steven CarnahanNetwork ManagerCommented:
Also, if you are logged in with domain administrative credentials and select run as administrator it doesn't always ask.
Pancake_EffectAuthor Commented:
Ah, we do have it disabled on our domain. Any way around it? While I want to have the Run As to be possible, it's not worth having UAC enabled "one of the most annoying features to ever ship with Windows."

I'm guessing I have to pick and choose....?
Pancake, it sounds like your environment has a fundamental difference from ours:  we almost never utilize our admin-level accounts to login normally.  As a result, whether it is a Vista or a Win7 machine when we select Run as administrator it always asks for our credentials.  In the interest of both security and stability on the Windows operating systems, none of our day-to-day accounts has admin privileges.  We all maintain two different accounts.
JohnBusiness Consultant (Owner)Commented:
UAC in Vista is a bit of an issue. If you have it off, then you need to live with Vista the way it is.

In Windows 7, you should never disable UAC. It prevents problems in Windows 7 and should remain enabled. If enabled, an administrator should be able to readily right click and Run as Adminstrator with admin credentials (or use the Shift trick).

I never disable UAC on any Windows 7 machine (mine or clients) to no ill affect.

... Thinkpads_User
As for having UAC disabled, I would strongly advise against doing that.  What may seem like an annoying feature is simply good security.  In contrast, I think there were very few things that were annoying about Windows XP, but unfortunately the malware authors felt the same way!
Steven CarnahanNetwork ManagerCommented:
I agree with thinkpads_user.  I don't even disable it on my personal computer.  I also agree with Run5k that you should have two separate accounts, one admin and one not. Use the admin account only under the elevated "run as" function. This is similar to using the "su" in the Unix/Linux world to run anything as "root".

UAC can be annoying yet very usefull.  :)
kanalQkoTechnical Support EngineerCommented:
On sysinternals you`d find utility that will allow you to run every application "run as different user"
Pancake_EffectAuthor Commented:
Sorry I think you misunderstood me somewhere, we do have two different privilege levels. All of our users have limited Domain User Accounts. Only the IT (me) have domain admin privileges.

But it's looking like only third party apps are going to allow the Run As Different User sadly.
Keep in mind that the Sysinternals tool that I suggested is not a third-party application. It is from Microsoft themselves.

...may I start by saying "what a discussion for such a small topic" - wow...

Let me put some things straight and show you what choices you have with vista.
First: be perfectly clear about the difference betwen running as admin/non-admin on UAC enabled/disabled vista systems. [Domain membership does not matter here].
1) If UAC is off and you are admin, no elevation takes place (because you are always elevated) so there is no way to use the GUI in order to utilise different credentials [the same is true for the builtin account “administrator” even if the UAC is on!]. We would have to use runas (commandline) or the aforementioned excellent http://technet.microsoft.com/en-us/sysinternals/cc300361.aspx

2) If UAC is off and you are non-admin [that’s the scenario you seem to be running], it's the same with the slight difference that you are always running non-elevated, again no GUI way to get to the credential prompt, again the 2 solutions from [1] apply

3) If UAC is on and you are admin, elevation will happen after you are prompted for consent. But WITH DEFAULT SETTINGS there is no way to enter credentials of another user and we still have to act as described in 1)

4) If UAC is on and you are admin AND we set the (local or domain) policy to prompt even admins for credentials we can finally enter credentials of different admin at least ON tasks that require elevation...NOT ON standard tasks like starting some random executable and not the credentials of a different non-admin... too bad. [So unless we choose to manually and mostly without need elevate those by rightclicking and selecting “run as administrator”, there is no way for random executables] - therefore, still the 2 solutions from 1) are the only possible ways without elevating.

5)For non-admins with UAC enabled, it is the same as 4) even with default settings. Non-admins ARE prompted for credentials on tasks where elevation is required and ARE NOT prompted for other tasks, but there still is (again) runas (commandline) or http://technet.microsoft.com/en-us/sysinternals/cc300361.aspx

Last but not least there is a registry tweak that can be called “onboard-workaround” because no external tools are used (although I would like to emphasize that  I would ultimately recommend http://technet.microsoft.com/en-us/sysinternals/cc300361.aspx , too):
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\exefile\shell\RunAs MyUser]

[HKEY_CLASSES_ROOT\exefile\shell\RunAs MyUser\command]
@="runas /netonly /user:NetbiosDomainname\\MyUser \"%1\""

Open in new window

Please note that this tweak is for .exe files but can be used for other file types (.bat, …) too.
Right after adding this to the registry, there is a new context menu entry for .exe files: Runas MyUser. You will only have to enter the password thereafter. Clean runas, no unnecessary elevation.
Please note: For EACH user you would like to utilise you would need a separate entry.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Thinkpads, I'm still a bit curious:  did you ever find the time to do a bit of investigation and determine when/where you have seen "Run as different user" enabled by default on a Windows 7 build?

Thanks again.
JohnBusiness Consultant (Owner)Commented:
I got to a Windows 7 Pro 64-bit machine on a Domain just now.

When I right click (just right click, do not have to hold down shift key), I can select the option Run as Administrator. When the authentication window comes up, I can enter any user on the Domain that is a member of the administrator's group.

So Run as different user is not there, but Run as Administrator is there and works for everything (I need).  ... Thinkpads_User
JohnBusiness Consultant (Owner)Commented:
>>> "It should do. Right Click, Run as and then authenticate as required. It always works for me whether on a domain or not. Please enter appropriate userid and password and Run As will work."

Sorry if that caused an issue. I was referring to Run as Adminstrator, which is there on a right click and always works for me, domain or not. I thought that is what the original question was after saying "it does not work for many things"

I did look at my Vista and my XP machines and only have Run as there as well. However I do see how the confusion arose.

... Thinkpads_User
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows OS

From novice to tech pro — start learning today.