Wednesday 18 April 2018

uac - Have Windows "Run" dialog run as Admin?


Windows has this nifty little shortcut for running commands. Press Windows+r.


Problem is, is there an easy way to have the commands I run in that dialog to prompt for a UAC credentials dialog and get consent from a admin user.


Right now, I'm trying to run this command in the Run dialog runas /user:admin "regedit.exe"


It works when I run this though: runas /user:admin "cmd"



Answer



I have the exact same problem. The Ctrl+Shift+Enter solution only works if you use the not-as-reliable start menu run box - but for the Win+R run box you are out of luck. The closest thing to a solution I have found is to manually set application properties to 'Run as Administrator' under the program compatibility tab.


For system utilities such as cmd.exe, you can put a shortcut in your User folder (C:\Users\%USERNAME%) and set 'Run as Admin' under shortcut advanced settings. See http://helpdeskgeek.com/windows-7/command-prompt-admin-rights-windows-7/ for detailed instructions. (To run the short cut you have to type the whole file name, e.g. cmd.lnk)


No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...