How to permanently run a program as administrator?

Jibby

Member
Oct 3, 2002
110
0
0
I've set up an adminstrator account and a limited user account on my computer. The limited user account is the one that I use most of the time, particularly when surfing the net. However, there are some applications that I use fairly regularly that require to be run with adminstrator rights as far as I know.

I know I can right-click on the shortcut and select "Run As." However, is there a way to allow a program administrator rights permanently instead of going through "Run As" every time you open it?
 

BlueWeasel

Lifer
Jun 2, 2000
15,940
474
126
Originally posted by: Jasiek
why would you use a limited account in the first place?

A limited account is extremely useful in preventing spyware/malware/exploits, as most of those are targeted toward Administrative accounts with full access to everything.
 

pontifex

Lifer
Dec 5, 2000
43,806
46
91
Originally posted by: Jibby
I've set up an adminstrator account and a limited user account on my computer. The limited user account is the one that I use most of the time, particularly when surfing the net. However, there are some applications that I use fairly regularly that require to be run with adminstrator rights as far as I know.

I know I can right-click on the shortcut and select "Run As." However, is there a way to allow a program administrator rights permanently instead of going through "Run As" every time you open it?

i've wondered about this same thing also.
from what i can tell, its not possible
 

Jibby

Member
Oct 3, 2002
110
0
0
Originally posted by: juiio
"Runas" works from a command line. Just create a script to run it.

Hmm, not sure if I know how to do so... but my case involves double-clicking files (and not the program's shortcut) as the most convenient way to open them using the program that requires admistrator rights. Would using a script be beneficial in this instance, if it is only applicable when double-clicking on the program's shortcut (assuming I understand what the script is meant to do to begin with)?
 

MSCoder610

Senior member
Aug 17, 2004
831
0
71
If you're just opening files through Windows Explorer, you could do something like:
Tools> Folder Options, File Types tab. Find the extension for the kind of file you're opening in the list. Click Advanced, then pick an action (something like "open" probably) and choose Edit.
You should see "Application used to perform action", with the full filename and path of the program you're using, plus %1 at the end. So you could try changing that to:
%systemroot%\system32\runas.exe /env /noprofile /savecred /user:COMPUTERNAME\Administrator "c:\pathtoprogram\program.exe %1"

Of course, change COMPUTERNAME, pathtoprogram, etc etc as applicable. Should work, haven't tried it myself though. (And it would prompt you once for the admin password then never again, if you don't want that get rid of the /savecred switch).