Add or Remove 'Open in Windows Terminal as administrator' context menu  

Page 2 of 4 FirstFirst 1234 LastLast

  1. Posts : 521
    Win7 Pro X64, Win10 Pro x640
       #10

    Brink said:
    You're most welcome.

    Using this below opened PowerShell v7 for me.

    @="powershell.exe -WindowStyle Hidden "Start-Process -Verb RunAs cmd.exe -ArgumentList @('/c','start wt.exe','-p','"""PowerShell"""','-d','"""%1"""')""

    The Azure Cloud Shell option is for this below:

    https://docs.microsoft.com/en-us/azu...shell/overview
    The Powershell 7 modification didn't work for me. No window opened. I believe it needs the same modification you made last night to the PowerShell v5.1 entry.
      My Computer


  2. Posts : 68,862
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #11

    bamajon1974 said:
    The Powershell 7 modification didn't work for me. No window opened. I believe it needs the same modification you made last night to the PowerShell v5.1 entry.
    Ok. I've added a Add_PowerShell_7.reg download to the tutorial to add PowerShell 7 to the context menu.

    This way it can serve as an add-on to the context menu, and the same can be done for other installed shells.
      My Computers


  3. Posts : 521
    Win7 Pro X64, Win10 Pro x640
       #12

    @Brink Thank you! The PowerShell 7 entry works.

    Two more questions: If I want to make the entries open the standard privilege terminal, I omit the "-Verb RunAs" after "Start Process" and before "cmd.exe -ArgumentList" right?

    About having the windows terminal icon, in the main [HKEY_CLASSES_ROOT\Directory\shell\OpenWTHereAsAdmin] key, if you add "Icon" string followed by "wt.exe" or "windowsterminal.exe", the wrong Icon is displayed (i think it is a blue open icon). If you add the full path to the icon, "%ProgramFiles%\WindowsApps\Microsoft.WindowsTerminal_1.7.1033.0_x64__8wekyb3d8bbwe\wt.exe"
    the correct icon is displayed, but the path is version specific and may not be valid every time Terminal is updated. Do you know a solution to this problem?

    Thanks!
      My Computer


  4. Posts : 68,862
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #13

    bamajon1974 said:
    @Brink Thank you! The PowerShell 7 entry works.

    Two more questions: If I want to make the entries open the standard privilege terminal, I omit the "-Verb RunAs" after "Start Process" and before "cmd.exe -ArgumentList" right?

    About having the windows terminal icon, in the main [HKEY_CLASSES_ROOT\Directory\shell\OpenWTHereAsAdmin] key, if you add "Icon" string followed by "wt.exe" or "windowsterminal.exe", the wrong Icon is displayed (i think it is a blue open icon). If you add the full path to the icon, "%ProgramFiles%\WindowsApps\Microsoft.WindowsTerminal_1.7.1033.0_x64__8wekyb3d8bbwe\wt.exe"
    the correct icon is displayed, but the path is version specific and may not be valid every time Terminal is updated. Do you know a solution to this problem?

    Thanks!
    You'll only need to remove the -Verb RunAs part of the command to not run as administrator.

    I couldn't find a valid universal path for the Windows Terminal icon, and opted to use the UAC icon.
      My Computers


  5. Posts : 521
    Win7 Pro X64, Win10 Pro x640
       #14

    Got it. Thank you!
      My Computer


  6. Posts : 68,862
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #15

    bamajon1974 said:
    Got it. Thank you!
      My Computers


  7. Posts : 521
    Win7 Pro X64, Win10 Pro x640
       #16

    Good evening @Brink
    Could you please create a tutorial for launching terminal from the context menu with standard privileges as well?

    Thanks!
      My Computer


  8. Posts : 68,862
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #17

    bamajon1974 said:
    Good evening @Brink
    Could you please create a tutorial for launching terminal from the context menu with standard privileges as well?

    Thanks!
    I'll add a tutorial for it tomorrow. You should have the default "Open in Windows Terminal" context menu available for now though.
      My Computers


  9. Posts : 521
    Win7 Pro X64, Win10 Pro x640
       #18

    Brink said:
    I'll add a tutorial for it tomorrow. You should have the default "Open in Windows Terminal" context menu available for now though.
    Great! Thank you! I disabled the default terminal context menu because there is no way to make it extended or add the different options you present in your tutorials.
      My Computer


  10. Posts : 68,862
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #19

    bamajon1974 said:
    Great! Thank you! I disabled the default terminal context menu because there is no way to make it extended or add the different options you present in your tutorials.
    Ok. Tutorial below all finished for you.

    Add 'Open in Windows Terminal' expandable context menu in Windows 10
      My Computers


 

Tutorial Categories

Add or Remove 'Open in Windows Terminal as administrator' context menu Tutorial Index Network & Sharing Instalation and Upgrade Browsers and Email General Tips Gaming Customization Apps and Features Virtualization BSOD System Security User Accounts Hardware and Drivers Updates and Activation Backup and Restore Performance and Maintenance Mixed Reality Phone


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

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




Windows 10 Forums