Elevated Command Prompt Shortcut

Page 5 of 5 FirstFirst ... 345

  1. Posts : 72,051
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #40

    GrayGhost2 said:
    Thank you Brink for another excellent tutorial. :)

    Warning
    You must be logged in as an administrator to be able to use this shortcut.
    As the 's advocate ...
    With an elevated cmd-prompt shortcut , ie "Run as Administrator" ... why would I need to be logged in as Admin to use the shortcut. ?

    Without having experimented with an elevated shortcut, what is the point of an elevated shortcut if it can only be used when logged in as administrator.
    If logged in as admin, wouldn't opening the cmd.exe default to Administrator.

    I would like to open an elevated cmd-prompt from my user account using the elevated shortcut.

    Sorry to be difficult ... I am not questioning the human logic ... but the OS/security logic.

    ---------------
    SPECS:
    Toshiba Satellite C665
    OS:= Windows 7 Home Premium (32-bit), sp1 (Build 7601) OEM
    UI:=Classic Shell Start + Classic Explorer
    Windows Indexing = disabled
    Security settings for C:\
    System ... (full control:=ON)
    Administrators (Owner-PC\Administrators) ... (full control:=OFF)
    Users (Owner-PC\Users) ... (full control:=OFF)
    No problem. Here's why. :)

    Nope. An administrator account is not an elevated account like the built-in elevated "Administrator" account. An administrator account behaves the same way as a standard user until you want to run something elevated (Run as administrator).

    If you are logged in to an administrator account and "Run as Administrator", you will be prompted by UAC to click on Yes/No to approve by default.

    If you are logged in to a standard user account and "Run as Administrator", you will be prompted by UAC to enter an administrator's password to approve by default.

    Thus, either way, you must be logged in as an administrator to "Run as Administrator".

    If you like, you could also use the method in the tutorial below to run an elevated command prompt in a standard user account without being prompted by UAC.
    Last edited by Brink; 15 Apr 2014 at 08:38. Reason: addition
      My Computer


  2. Posts : 5,605
    Originally Win 7 Hm Prem x64 Ver 6.1.7600 Build 7601-SP1 | Upgraded to Windows 10 December 14, 2019
       #41

    GrayGhost2 said:
    I would like to open an elevated cmd-prompt from my user account using the elevated shortcut.
    Have you tried creating the shortcut for the elevated cmd and then either leaving it on your desktop or pinning it to your taskbar?

    There are several options to do that here: Shortcut - Create for a File, Folder, Drive, or Program in Windows The one way you may be comfortable with is Option Four.

    • Copy/type/paste this C:\Windows\System32\cmd.exe into the Location box in step #2.


    • It will skip step #'s 3 and 4, and go directly to step #5 where you can give your new shortcut a name that suits you.


    • Click on Finish and see your new shortcut on your desktop.


    • You can either leave it on the desktop or right click it to open the context menu, where you can pin it to the Taskbar or the Start Menu.

    Depending on how you have your User Account Control set you will still have to OK it unless you have it set to Never Notify which is dangerous to do.


    After creating the first part of this post I saw this which might be better: Elevated Program Shortcut without UAC Prompt - Create
      My Computer


  3. Posts : 721
    Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
       #42

    Referring to Option 2, Step 2, it may be shorter and nicer looking to use the %ComSpec% system environment variable over %windir%\System32\cmd.exe as the target.
      My Computer


  4. Posts : 72,051
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #43

    Pyprohly said:
    Referring to Option 2, Step 2, it may be shorter and nicer looking to use the %ComSpec% system environment variable over %windir%\System32\cmd.exe as the target.
    Thank you. I added it to step 2 in Option 2 as another choice. :)
      My Computer


  5. Posts : 2
    win7 pro
       #44

    thank you
    i have it pinned to the start menu and it opens fine after the user account control
    do you want the following program to make changes to this computer?
    i click yes and there it is.
      My Computer


  6. Posts : 1
    Windows 10 Professional 64bit
       #45

    not sure it safe but it is functionning


    Hi,

    Looking at some explanations in internet and on your forum, i found a manner to launch via a shortcut launching a CMD file directly open a command prompt as elevated admin user but not at the begin.
    Simple: i'm not admin but know the admin because, i'm the same person on my computer.
    And for some tasks i have to be the admin in the cmd-prompt and want to do it very quickly without entering the password.

    Solution i found is using a cmd file where i'm using psexec command and powershell command.
    Create the file like "elevated-Comand.cmd"
    Containing only the following line:
    "[DIR where you installed psexec from pstools]psexec.exe" -user [domain|workgroup]\[user_with_admin_rights] -p [password_in_clear] -nobanner -accepteula "powershell" "start cmd -v runas"
    And it is it.
    You get a Command prompt with admin rights and for example type the following command :
    net session

    In case you're in an unelevated user rights command prompt your result should be something like:
    Access denied
      My Computer


 
Page 5 of 5 FirstFirst ... 345

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 23:50.
Find Us