How To make RUN prompt to execute programs with Admin rights

Discussion in 'Windows 8' started by quill, Nov 14, 2012.

  1. quill

    quill MDL Novice

    Aug 19, 2012
    22
    4
    0
    #1 quill, Nov 14, 2012
    Last edited by a moderator: Apr 20, 2017
    I'm little confused here.

    I'm on Windows 8.

    Basically I use Run prompt window a lot (Windows Key + R). I want to execute cmd as Admin from the Run prompt, not just cmd, any program if I would like to run from the prompt as admin.

    So, I thought find the location of the Run Prompt shortcut, it is here
    Code:
    C:\Users\MyName\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\System Tools
    Then right click shortcut > properties > shortcut tab > Advanced > Run as Admin check box. But the Run as admin check box is greyed out. How do I do it? Any help please.

    My UAC is not disabled, please check these screenshots of above description.

    run1.jpg
    run2.PNG
    run3.jpg
    run4.jpg

    Thanks.
     
  2. pisthai

    pisthai Imperfect Human

    Jul 29, 2009
    7,221
    2,272
    240
    #2 pisthai, Nov 14, 2012
    Last edited by a moderator: Apr 20, 2017
    Right click on Desktop in free area, click on Apps Icon in lower right side of the bar, move the screen to left using Mouse wheel, right click on Command Prompt and click Ru as administrator Icon in lower Bar. That's all.

    Now you're on Command Prompt running as administrator.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Glavin

    Glavin MDL Novice

    Aug 29, 2012
    36
    61
    0
    #3 Glavin, Nov 14, 2012
    Last edited by a moderator: Apr 20, 2017
    On desktop, right click and New \ Shortcut and paste the following command
    Code:
    %windir%\explorer.exe shell:::{2559a1f3-21d7-11d4-bdaf-00c04f60b9f0}
    Name it as Run or whatever you want , then open its properties and click advanced and tick Run as administrator. Also assign a shortcut key if you want.
     
  4. quill

    quill MDL Novice

    Aug 19, 2012
    22
    4
    0
    #4 quill, Nov 14, 2012
    Last edited by a moderator: Apr 20, 2017
    (OP)
    It is NOT the solution for what I'm asking :( Your answer is one of the options to access CMD as admin.

    Thanks for your quick answer. It answers my question above but cannot solve the problem.
    After running that shortcut, when I type cmd, it just opens up cmd as a user not as admin.

    So, finally, is there a way to Run a program from "Run Prompt" (this is not CMD) as admin.
    For example by just typing "cmd -admin" or "firefox -admin" into Run Prompt?? I don't know whether it is possible or not, just asking.
     
  5. 100

    100 MDL Expert

    May 17, 2011
    1,349
    1,576
    60
    Unfortunately this opens the "Run" dialog in the limited explorer process, so it doesn't start processes with elevated privileges. Not sure if there's a proper way around that (other than using a "Run" replacement) because Explorer's handling of UAC is kind of weird.
    The quickest way is still to just enter the program name (e.g. "cmd") in the start menu/start screen, and use Ctrl+Shift+Enter to run it with administrator privileges (doesn't work in the "Run" dialog, unfortunately).

    Also, Task Manager likes to run with elevated privileges, and a quick way to open an admin command prompt from there is File / Ctrl+Run new task (or Alt+F, Ctrl+Enter).
     
  6. pisthai

    pisthai Imperfect Human

    Jul 29, 2009
    7,221
    2,272
    240
    You asked this:
    cmd is the Command Prompt! if you type cmd in the Run command line, the Command Prompt will open.

    As I understand what you'd written, you like to use the Apps Run and type in cmd in the command line and run that as Admin! The effect of what happen if you use the way I explained, is exactly the same, just a bit different way.

    So if you don't want the run cmd as Administrator, what do you really want?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. 100

    100 MDL Expert

    May 17, 2011
    1,349
    1,576
    60
    Many people prefer a way that doesn't involve using the mouse, because when you do a lot of typing and you've got your hands on the keyboard, switching to the mouse and then back to the keyboard is something that's very inconvenient. We all know the way of right-clicking and to "run as administrator", but using that is nothing else than an annoyance if you're used to use the "Run" dialog.
     
  8. user_hidden

    user_hidden MDL Expert

    Dec 18, 2007
    1,034
    1,061
    60
    #8 user_hidden, Nov 14, 2012
    Last edited by a moderator: Apr 20, 2017
    don't remember where i picked up the snippet below but thanks to the author:

    Code:
    @Echo off
    :: Check for permissions
    >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
    
    :: If error flag set, we do not have admin.
    if '%errorlevel%' NEQ '0' (
    Echo Requesting administrative privileges...
    goto UACPrompt
    ) else ( goto gotAdmin )
    
    :UACPrompt
    Echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
    Echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"
    
    "%temp%\getadmin.vbs"
    Exit /B
    
    :gotAdmin
    if exist "%temp%\getadmin.vbs" ( Del "%temp%\getadmin.vbs" )
    Pushd "%CD%"
    CD /D "%~dp0"
    
    REM <YOUR BATCH SCRIPT HERE>
    ECHO.
    ECHO You should have had a UAC Prompt
    ECHO and now you have Admin Rights
    ECHO.
    pause
    
     
  9. pisthai

    pisthai Imperfect Human

    Jul 29, 2009
    7,221
    2,272
    240
    You're not wrong with that.

    Personally I use Macro's for many task's which also includes the Win+R+cmd+elevated! But that involves 3.party software and I'm still om testing that on Windows 8. Unfortunate I didn't got and 64bit Apps for that, yet, only 32bit! It's also a bit time consuming to set all that up what I need to run via Macro's.

    My answer above were only for the member asked and to show just one of several way's How To...!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. quill

    quill MDL Novice

    Aug 19, 2012
    22
    4
    0
    I think u have misunderstood my point. CMD is not same as "Run Prompt". I want to execute any program (one of them is CMD) from the Run Prompt. If you are not sure, what I'm saying, please see these screenshots.

    Run Prompt (Windows+R) :
    show1.jpg

    CMD - Command Prompt:
    show2.jpg

    Hope you get it now.

    By the way, I don't want to mouse :)
     
  11. pisthai

    pisthai Imperfect Human

    Jul 29, 2009
    7,221
    2,272
    240
    Than you should have write more detailed on beginning!~ If you had written that you like to run several command in elevated stage that would have be different. You clearly stated that you like to run the command "cmd" and my answer were exactly for that.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  12. quill

    quill MDL Novice

    Aug 19, 2012
    22
    4
    0
    #12 quill, Nov 14, 2012
    Last edited by a moderator: Apr 20, 2017
    (OP)
    I'm one of that many people who prefer to use keyboard a lot. I'm getting used to Run Dialog a lot in win 8. So looking for better solutions.


    How do I test/use this script:confused: Sorry, don't know about scripts. :(
     
  13. Stannieman

    Stannieman MDL Guru

    Sep 4, 2009
    2,232
    1,818
    90
    #13 Stannieman, Nov 14, 2012
    Last edited: Nov 14, 2012
    Just don't use the run dialog. Pin cmd to the taskbar, richt click on it and now you can tick the admin checkbox. Then press winkey + number (position of the shortcut).
    So if you have the shurtcut pinned as first app (most left), press winkey + 1 and it launches as admin.
    Use the numbers from the typing keyboard, numpad won't work.

    Any command typed in the runprompt will work in cmd too btw, so it works, the only disadvantage is that the cmd window doesn't automatically close after you press enter.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  14. quill

    quill MDL Novice

    Aug 19, 2012
    22
    4
    0
    I hope u've quoted my first post saying
    in which I said clearly, cmd as admin from RUN prompt (not command prompt).

    I don't want to argue with you buddy. I hope u get the question now, getting to know the answer.
    Thanks.
     
  15. quill

    quill MDL Novice

    Aug 19, 2012
    22
    4
    0
    Thanks for the quick reply. I get that. I just quoted cmd as an example.
    Using run prompt or run dialog, I can run many programs like

    • cmd – Command prompt
    • winword – Microsoft Word
    • excel – Microsoft Excel
    • outlook – Microsoft Outlook
    • iexplore – Internet Explorer
    • firefox – Mozilla Firefox
    • notepad – Notepad
    • compmgmt.msc – Computer Management Console
    • control appwiz.cpl – Add/Remove programs dialog
    • mstsc – Microsoft Terminal Service Client
    • regedit – Registry Editor

    so, my question is how do I execute these programs(but not limited to these programs) as admin from the Run prompt.
     
  16. quill

    quill MDL Novice

    Aug 19, 2012
    22
    4
    0
    #16 quill, Nov 14, 2012
    Last edited by a moderator: Apr 20, 2017
    (OP)
    Could you please explain a bit more how to do it? an example perhaps?
     
  17. quill

    quill MDL Novice

    Aug 19, 2012
    22
    4
    0
    Nope didn't get any from Run dialog or Run prompt.
     
  18. robmadden1

    robmadden1 MDL Member

    Oct 21, 2009
    185
    30
    10
    go into the folders with the exe files you want to run with admin rights. Set each one to run as admistrator.

    Right click the exe
    then clcik on compatibility
    Check Run this program as am administrator
    click ok

    Now everytime you run the program it will run with admin right no matter where you run it from.
     
  19. quill

    quill MDL Novice

    Aug 19, 2012
    22
    4
    0
    Thanks for your answer. Not every time that I want to execute all programs as admin. Less frequently though, but still I'm looking for a solution that I could do it from "Run Prompt" alone.
     
  20. quill

    quill MDL Novice

    Aug 19, 2012
    22
    4
    0
    #20 quill, Nov 14, 2012
    Last edited by a moderator: Apr 20, 2017
    (OP)
    Wow, I didn't know that I'm wasting your time here !!

    As for your solution, it says blank passwords are not allowed.. well I do use blank password for admin. Still got any solution?

    And really, please ignore this if u are BUSY.