Skip to content

Add "open Windows terminal here" into right-click context menu #1060

Closed
@yanglr

Description

@yanglr

Add "open Windows terminal here" to right-click context menu?

We know that, for windows 7, by default when we click "shift + right click with mouse" when we enter into a folder without selecting anything, we can see the option "open command window here".

image

While for windows 10, by default when we click "shift + right click with mouse", we can see the option "open powershell window here".

So for Windows 10 (version later than 1903), how can we make the following three options available in right-click context menu?

  • open command window here
  • open powershell window here
  • open Windows terminal here

Looking forward to your reply, thanks a lot~

Activity

added
Issue-FeatureComplex enough to require an in depth planning process and actual budgeted, scheduled work.
on May 30, 2019
ghost added
Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting
on May 30, 2019
ghost added
Needs-Tag-FixDoesn't match tag requirements
on May 30, 2019
changed the title [-]Is there a method to add "open Windows terminal here" to right-click context menu?[/-] [+]Is there a method to add "open Windows terminal here" into right-click context menu?[/+] on May 30, 2019
SJang1

SJang1 commented on May 30, 2019

@SJang1

If adding it, I think it should have one more select option in open Windows terminal here to select actually what shell to open as submenu of context menu (or like that) with the 'name' wrotted in profiles of terminal, like

  • Powershell
  • CMD
  • Ubuntu
zadjii-msft

zadjii-msft commented on May 30, 2019

@zadjii-msft
Member

I think this is a good feature request, and something that we'd definitely accept help from the community on.

My gut says that it'd be related to work for #689, but I don't know enough about Win32 to be sure.

added
Area-UserInterfaceIssues pertaining to the user interface of the Console or Terminal
Help WantedWe encourage anyone to jump in on these.
on May 30, 2019
ghost removed
Needs-Tag-FixDoesn't match tag requirements
on May 30, 2019
added this to the Terminal Backlog milestone on May 30, 2019
miniksa

miniksa commented on May 30, 2019

@miniksa
Member

This is probably something like this: https://www.codeproject.com/Articles/441/The-Complete-Idiot-s-Guide-to-Writing-Shell-Extens

But hopefully without re-introducing ATL into our codebase...

factormystic

factormystic commented on May 30, 2019

@factormystic

It's way, way easier than that to add a single command to a folder context menu. It's just a simple registry key.

For example (and then you can also add an icon, etc)

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell\Open Thing Here\command]
@="C:\\thing.exe \"%1\""
ChrisGuzak

ChrisGuzak commented on May 30, 2019

@ChrisGuzak
Member

for pacakged apps this is declared in the manifest. see this: https://docs.microsoft.com/en-us/uwp/schemas/appxpackage/uapmanifestschema/element-uap-filetypeassociation. I don't think this supports folders but start looking here.

DHowett-MSFT

DHowett-MSFT commented on May 30, 2019

@DHowett-MSFT
Contributor

Likely duplicate of #561, but we'll track it here.

changed the title [-]Is there a method to add "open Windows terminal here" into right-click context menu?[/-] [+]Add "open Windows terminal here" into right-click context menu[/+] on May 30, 2019
removed
Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting
on May 30, 2019
yanglr

yanglr commented on May 31, 2019

@yanglr
Author

@miniksa @zadjii-msft @DHowett-MSFT @factormystic @ChrisGuzak

I solved the issue now, it could be closed. Thanks a lot to all who involved into this discussion.

Step 0:

Test if two constants below works well which will be used in following other steps.

echo %USERPROFILE%

echo %LOCALAPPDATA%

If everything works well here, then these two constants can be used directly in other below steps.

Or please perform following replacements in below steps:

%USERPROFILE% → C:\Users\[userName]
%LOCALAPPDATA% → C:\Users\[userName]\AppData\Local

Here [userName] represents your user name,for instance, mine is Bruce.

Step 1:
Run below stuff in CMD:

mkdir "%USERPROFILE%\AppData\Local\terminal"

image

Step 2:
Copy the windows terminal icon to the folder %USERPROFILE%\AppData\Local\terminal, the icon can be obtained in https://github.com/yanglr/WindowsDevTools/tree/master/awosomeTerminal/icons whose file name is wt_32.ico.

Step 3:
Save follwing content as wt.reg, then run as administrator.

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\Background\shell\wt]
@="Windows terminal here"
"Icon"="%USERPROFILE%\\AppData\\Local\\terminal\\wt_32.ico"

[HKEY_CLASSES_ROOT\Directory\Background\shell\wt\command]
@="%LOCALAPPDATA%\\Microsoft\\WindowsApps\\wt.exe"

To be noted, if the exe obtained after building code by yourself is wtd.exe, you need to change the above wt.exe to wtd.exe in the above registry.

Step 4:
Test
image

SJang1

SJang1 commented on May 31, 2019

@SJang1

That didn't work to me (can't access to it error), and for me it was wtd.exe(didn't even work).
And I think this could be the Terminal Feature.

yanglr

yanglr commented on May 31, 2019

@yanglr
Author

@SJang1
I guess you used the version you bulit yourself, so need to use wtd.exe. For incoming official version to enter into Windows Store, wt.exe is the correct option here. For now, you can obtain preview version here (.7z file under https://github.com/yanglr/WindowsDevTools/tree/master/awosomeTerminal), then use wt.exe after installed. I adopted this method.

268 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Area-UserInterfaceIssues pertaining to the user interface of the Console or TerminalHelp WantedWe encourage anyone to jump in on these.Issue-FeatureComplex enough to require an in depth planning process and actual budgeted, scheduled work.Product-TerminalThe new Windows Terminal.Resolution-Fix-CommittedFix is checked in, but it might be 3-4 weeks until a release.

Type

No type

Projects

No projects

Relationships

None yet

    Development

    Participants

    @shanselman@0x7FFFFFFFFFFFFFFF@factormystic@Stanzilla@rfgamaral

    Issue actions

      Add "open Windows terminal here" into right-click context menu · Issue #1060 · microsoft/terminal