Open Command Window Here as Administrator

Page 3 of 5 FirstFirst 12345 LastLast

  1. Posts : 21
    8.1
       #20

    Is there any way to change out the shift+click command prompt for a shift+click elevated command prompt?

    Id rather keep the shift functionality but prefer it to be elevated

    Ive been digging with no such luck :P
      My Computer


  2. Posts : 72,050
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #21

    Hello Kevin,

    The tutorial on the first page lets you just right click on a folder or drive to open an elevated command prompt at that location.

    If you like, I could have it where you would have to use Shift with it. :)
      My Computer


  3. Posts : 21
    8.1
       #22

    Yes, if you could provide a Reg file to make it require shift that would be excellent. As well as a means to undo it. I've been using the right click means for awhile but I'm trying to clean up my context menu a bit and the ability to use it as naturally implemented but with the prompt being an elevated one instead if standard is ideal if possible.

    Thank you!
      My Computer


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

    You're most welcome. :)

    I added step 3 for the shift + right click option. Step 4 will still work to remove them.
      My Computer


  5. Posts : 1
    Windows 7 Ultimate x64
       #24

    Windows Libraries


    Normally Libraries has no support for "Open command window here", however it can be added using this registry entry:

    Code:
    Windows Registry Editor Version 5.00
    [HKEY_CLASSES_ROOT\LibraryFolder\background\shell\cmd]
    @="@shell32.dll,-8506"
    
    [HKEY_CLASSES_ROOT\LibraryFolder\background\shell\cmd\command]
    @="cmd.exe /s /k pushd \"%V\""
    Therefore the Administrator version can easily be added:

    Code:
    Windows Registry Editor Version 5.00
    [HKEY_CLASSES_ROOT\LibraryFolder\background\shell\runas]
    "HasLUAShield"=""
    @="Open command window here as Administrator"
    
    [HKEY_CLASSES_ROOT\LibraryFolder\background\shell\runas\command]
    @="cmd.exe /s /k pushd \"%V\""
      My Computer


  6. Posts : 72,050
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #25

    Thank you greens, and welcome to Seven Forums. I added this to the tutorial to help others. :)
      My Computer


  7. Posts : 17
    Win7 Pro SP1 64-bit
       #26

    I've been looking for some time for a way to add Open Command Window Here as Administrator to the file context menu. Does anyone know a solution?

    Since Vista forward it is possible to get Open Command Window Here in explorer right-side (file) pane, provided you can right-click on a completely blank line (not just a blank area), such as in the area below the list of files.

    There is no such blank area if the list of files exceeds a page full though, so this is not too convenient. And no way to get an elevated CMD window AFAIK.

    I did add an Open CMD window to the file's send-to options on the context menu, this is very convenient. But I don't know how to modify it to open as elevated? Maybe someone knows how?

    To add Open CMD window to the file's send-to options, do the following. Works for me in all versions of Windows from NT on up.

    Find the user's send-to folder for the version of windows. Create a batch file there, I call mine OpenCMDPromptHere.bat.
    @echo off
    %~d1
    CD %~dp1
    CMD /K

    OpenCMDPromptHere.bat will now show up as an entry under user's send-to menu for files.

    Thank you for any help getting an elevated prompt onto the file context menu directly, or in the file's send-to menu similar to the above.

    Kind regards.
      My Computer


  8. Posts : 72,050
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #27

    Hello appyface, :)

    Usually when you "open a command prompt here", it's for a location instead of file.

    Opening a file in a command prompt will essential be the same as just opening the file.

    If you're just wanting to open a file elevated, then the "Run as administrator" context menu will basically serve the purpose you want for application files (ex: ".exe").

    Was there some specific task you were wanting to do that this doesn't apply to?
      My Computer


  9. Posts : 17
    Win7 Pro SP1 64-bit
       #28

    Hello Brink,

    Thank you for your reply.

    I'm very sorry I wasn't clear. I wish to open CMD as Administrator for the directory location where the file is, but from the file's context menu.

    I have achieved this for normal CMD window with the send-to menu method I gave. But I don't know how to modify that method to also provide an elevated CMD window from file's send-to menu.

    And I haven't found any other way to add CMD window (or CMD as Administrator window) to the file's context menu so far.

    For me it's a fair pain to traverse the left pane directory tree for the subdirectory (which I don't usually have expanded) just so I can get to the context menu.

    It's less of pain to navigate up a level from the file pane and get to the subdirectory context menu that way, but if there are many subdirectories it's still not the friendliest method.

    If there is a fully-blank area below the file list the normal CMD window can be gotten with shift-right-click in native Windows (since Vista), but not the CMD as Administrator window AFAIK. And there is no blank area below when the file list exceeds one page, that I can find.

    It is just so very convenient to have CMD window available from the file's context menu. That is why I wish to add the elevated option there, if it is possible?

    Kind regards.
      My Computer


  10. Posts : 72,050
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #29

    I'm not sure how to do so from the file's context menu as well.

    You should be able to Shift+right click on the background of the window the file is located to see Open Command Window Here as Administrator.

    If you don't, then see if you do after using the download from step 2 or 3.
      My Computer


 
Page 3 of 5 FirstFirst 12345 LastLast

  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 15:11.
Find Us