Force Windows to prompt for credentials for selected applications


I have two user accounts. One is my regular account, the other one has administrative privileges throughout the domain. I log on with my regular account, and launch most programs. As my regular account has local administrative privileges, I am not prompted for credentials, only for approval.

Some programs we use demand that I run them as my domain admin, in order to run. Now, I know that I can simply hold shift down, right click the logo, and select "Run as another user". However, I want to be prompted for credentials, even if I forget to do so.

Best Answer

If you want to "run as admin" all the time, look at the last paragraph of this answer.

If you want to "run as different user" all the time, do this:

Make sure the program is a shortcut to the program. If it isn't, right click > New shortcut and choose the location of the original program.

When you have the shortcut, right click it > Properties > 'Shortcut' tab.

In the target field, cut or copy and delete everything.

Type: runas /user:DOMAIN\USER-NAME

for example - runas /user:superuser\razumny

and then paste the original target afterwards.

for example - runas /user:superuser\razumny "C:\Program Files\WinRAR\WinRAR.exe

Now, test it. It will ask to type in the password for superuser\razumny inside a command prompt. You will not see anything you type in, but it will be entering.

If you want to remember your credentials, type in /savecreds after your username.

For example - runas /user:superuser\razumny /savecreds "C:\Program Files\WinRAR\WinRAR.exe

This will only ask for your password the first time.

Test it again.

If you're happy, then you will need to change the shortcut image back to the original one - it will have been removed due to a new location used as the target. TO do this, Right click on the shortcut > properties > shortcut > Change Icon... and find the icon you want.

If you're just looking to run as administrator, then all you need to do is right click the shortcut > Properties > Compatibility > check the 'Run this program as Administrator' box.