'Start' > 'Run' As Admin

Soldato
Joined
2 May 2004
Posts
19,943
Does anybody know if there's a way to set "Start" > "Run" to run programs always as admin? More often than not whenever I run something from "Run" I want it in admin mode (cmd is a good example).

Obviously I want to keep UAC enabled, but would like "Run" to always start applications as admin.

I know I can also do "Start" > Type in "cmd" > Ctrl + Shift + Enter, but I prefer Windows Key + R > cmd > enter

Any ideas?

Thanks.
 
Soldato
Joined
16 Dec 2005
Posts
14,443
Location
Manchester
Create a shortcut to CMD, for example, and set the shortcut as Run As Admin. Put it in your start menu or task bar. You could also put it into your run path and give it a name like cmdadmin
 
Associate
Joined
28 Jun 2010
Posts
68
Location
UK
Not 100% sure if this will work but you can try it:

Go to:

1. Start Menu
2. All Programs
3. Accessories
4. Right click on the Command Prompt Short cut and choose properties
5. Click the advanced button in that window select the tick box run as administrator then click ok.
6. Click ok on the next window

It should now always run as administrator. You can probably do that on other system tools.
 
Soldato
Joined
16 Dec 2005
Posts
14,443
Location
Manchester
Do as I suggest and it shall be slow no more! :D

I suspect it is a feature of Windows not to let you set the run/search boxes as Run as Admin. Could easily make a mistake or allow access to something.

Either way it is not an issue for me. The very few programs I need to run as Admin from the start are set as such via shortcuts. :)
 
Soldato
OP
Joined
2 May 2004
Posts
19,943
Not 100% sure if this will work but you can try it:

Go to:

1. Start Menu
2. All Programs
3. Accessories
4. Right click on the Command Prompt Short cut and choose properties
5. Click the advanced button in that window select the tick box run as administrator then click ok.
6. Click ok on the next window

It should now always run as administrator. You can probably do that on other system tools.

That'll work for cmd, but not for everything else that you enter into the Run box :(

Do as I suggest and it shall be slow no more! :D

I suspect it is a feature of Windows not to let you set the run/search boxes as Run as Admin. Could easily make a mistake or allow access to something.

Either way it is not an issue for me. The very few programs I need to run as Admin from the start are set as such via shortcuts. :)

I suppose I could, or I could just continue using Start > 'cmd' > Ctrl+Shift+Enter

I wish there was a way. Run = a bit pointless these days. It'd bring it back to life if you could set it to run everything as admin.
 
Soldato
Joined
16 Dec 2005
Posts
14,443
Location
Manchester
Nothing wrong with Run. The vast majority of programs you would run from err run, do not require admin rights to um run. :p

If you find you need to run a lot of programs with admin rights, do it all from a CMD or Powershell console with admin rights.
 

Pho

Pho

Soldato
Joined
18 Oct 2002
Posts
9,324
Location
Derbyshire
http://gloriouscomputing.wordpress.com/2009/10/16/sudo-for-windows-7vista/

Check out the comments from someone called Christof Germishuizen - it looks like a fairly good workaround for what you want to do.

Essentially drop the exe file somewhere in your path (i.e. system32) and name it whatever you like, i.e. su (Linux style :o) and then in your run dialog type su <program name> <arguments> to run it elevated. You will get the UAC prompt as normal:

su notepad c:\windows\system32\drivers\etc\hosts


Here's the decoded exe from his other comment ready to go: http://homepages.nildram.co.uk/~akiller/OcUK/files/elevate.zip - I ran it quickly through a disassembler and VirusTotal and it looks clean.
 
Soldato
OP
Joined
2 May 2004
Posts
19,943
Nothing wrong with Run. The vast majority of programs you would run from err run, do not require admin rights to um run. :p

If you find you need to run a lot of programs with admin rights, do it all from a CMD or Powershell console with admin rights.

Nope, there is nothing wrong with run, I still use it daily, it would just be more handy to me if it ran everything in admin mode :)


http://gloriouscomputing.wordpress.com/2009/10/16/sudo-for-windows-7vista/

Check out the comments from someone called Christof Germishuizen - it looks like a fairly good workaround for what you want to do.

Essentially drop the exe file somewhere in your path (i.e. system32) and name it whatever you like, i.e. su (Linux style :o) and then in your run dialog type su <program name> <arguments> to run it elevated. You will get the UAC prompt as normal:

su notepad c:\windows\system32\drivers\etc\hosts


Here's the decoded exe from his other comment ready to go: http://homepages.nildram.co.uk/~akiller/OcUK/files/elevate.zip - I ran it quickly through a disassembler and VirusTotal and it looks clean.

Ooo I like su. I'll check it out, thanks.
 

Pho

Pho

Soldato
Joined
18 Oct 2002
Posts
9,324
Location
Derbyshire
Code:
private static void Main(string[] args)
{
    args.ToString();
    Process.Start(args[0]);
}
:p


Nice :), doesn't seem to work with command line arguments like "su notepad c:\windows\system32\drivers\etc\hosts" for me though?
 
Soldato
OP
Joined
2 May 2004
Posts
19,943
True, it doesn't. Not sure why I left args.ToString(); in there either - I was playing around with something else and forgot to take it out, so only one line is needed :p

The key is really the manifest: "<requestedExecutionLevel level="highestAvailable" uiAccess="false" />"

My console knowledge of C# doesn't go very far at the moment, so I'm not sure why you can't do "su notepad c:\windows\system32\drivers\etc\hosts". I'll see if I can sort that though, would be handy as I also get to hosts and other files like that.

Is that my exe you decompiled there, or did you write the exact same code as me? :p
 
Last edited:
Back
Top Bottom