From a10f0aa0755b1d90f0ef20a6ce688ccbebe49f6f Mon Sep 17 00:00:00 2001 From: KUTlime Date: Thu, 27 Feb 2020 10:25:57 +0100 Subject: [PATCH] Fixing Open here for Windows Terminal. --- OpenHere/OpenHere.psd1 | 6 +++++- OpenHere/OpenHere.psm1 | 4 ++-- README.md | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/OpenHere/OpenHere.psd1 b/OpenHere/OpenHere.psd1 index ecde75a..e6d3fcc 100644 --- a/OpenHere/OpenHere.psd1 +++ b/OpenHere/OpenHere.psd1 @@ -12,7 +12,7 @@ RootModule = 'OpenHere' # Version number of this module. - ModuleVersion = '2.0.3' + ModuleVersion = '2.0.4' # Supported PSEditions # CompatiblePSEditions = @() @@ -111,6 +111,10 @@ # ReleaseNotes of this module ReleaseNotes = @' +v2.0.4: (2020-02-27) +- A workaround for Windows Terminal open here shortcut when RMB on directory/drive letter has been added. +- From this version, both Windows Terminal Open here shortcuts use Windows PowerShell for a correct startup. + v2.0.3: (2020-02-24) - A workaround for Windows Terminal open here as admin has been added. diff --git a/OpenHere/OpenHere.psm1 b/OpenHere/OpenHere.psm1 index bbf7339..742d23f 100644 --- a/OpenHere/OpenHere.psm1 +++ b/OpenHere/OpenHere.psm1 @@ -56,7 +56,7 @@ function Get-OpenHereShortcutSetup $shellSetup.RegistryKeyName = 'WindowsTerminal' $shellSetup.ShellType = 'WindowsTerminal' $shellSetup.CommandRoot = 'openWindowsTerminal' - $shellSetup.CommandExecutionValue = "$env:LOCALAPPDATA\Microsoft\WindowsApps\wt.exe -d ." + $shellSetup.CommandExecutionValue = "$env:SystemRoot\system32\WindowsPowerShell\v1.0\powershell.exe -noninteractive -noprofile -command Set-Location '%V';start-process wt -argumentList '-d .'" $shellSetup.CommandExecutionValueRunAs = "$env:SystemRoot\system32\WindowsPowerShell\v1.0\powershell.exe -noninteractive -noprofile -command Set-Location '%V';start-process wt -argumentList '-d .'" } Default { throw [System.ArgumentOutOfRangeException]::('Unknown Shell type.') } @@ -126,7 +126,7 @@ function Set-OpenHereShortcut .NOTES To override the default shortcut icon, override the Icon.ico file in %LOCALAPPDATA%\OpenHere\[ShellType]. The context menu can be invoked from the menu button and by the right mouse button click. - Windows Terminal doesn't response to Run as Administrator. No explanation is provided so far. The support is + Windows Terminal doesn't responds to RunAs request from the context menu. This problem is a limitation of the UWP platform. A workaround has been implemented to support Windows Terminal shortcut with elevated privileges. A similar workaround had to be implemented for non-elevated Open here Windows Terminal shortcut to support scenarios when requests are invoked from RMB clicks on a directory or a drive letter. #> [CmdletBinding()] Param ( diff --git a/README.md b/README.md index ba0bd36..bd2186b 100644 --- a/README.md +++ b/README.md @@ -72,7 +72,7 @@ Get-Help Set-OpenHereShortcut -Examples ``` # Notes -Windows Terminal doesn't responds to RunAs request from the context menu. This problem is a limitation of the UWP platform. A workaround has been implemented to support Windows Terminal shortcut with elevated privileges. +Windows Terminal doesn't responds to RunAs request from the context menu. This problem is a limitation of the UWP platform. A workaround has been implemented to support Windows Terminal shortcut with elevated privileges. A similar workaround had to be implemented for non-elevated Open here Windows Terminal shortcut to support scenarios when requests are invoked from RMB clicks on a directory or a drive letter. # FAQ ### Are there any plans to extend the functionality of this module?