Windows Registry Editor Version 5.00

;-----------------------------------------------------------------------------
;
;  TSDuck - The MPEG Transport Stream Toolkit
;  Copyright (c) 2005-2023, Thierry Lelegard
;  BSD-2-Clause license, see LICENSE.txt file or https://tsduck.io/license
;
;  Windows registry entries to facilitate the usage of the Windows PowerShell.
;
;-----------------------------------------------------------------------------

; A Windows PowerShell script file name has a ".ps1" extension.
; Default action for double-click on a script file in Windows Explorer is to
; edit the script file using notepad. We change this to execute the script.
; The output window is visible but is automatically closed after execution of
; the script. If you want the window to remain visible after execution, add a
; "pause" at the end of the script.

[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\shell\open\Command]
@="\"C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe\" -ExecutionPolicy RemoteSigned -File \"%1\""

; Define how "Open With" should invoke PowerShell on a script.
; Same as default double-click action on a script but explicitely redefined in
; case the user specifies "Open With" and powershell.exe on a script file.

[HKEY_CLASSES_ROOT\Applications\powershell.exe\shell\open\command]
@="\"C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe\" -ExecutionPolicy RemoteSigned -File \"%1\""

; Add an "Open PowerShell Here" in the context menu of directories.

[HKEY_CLASSES_ROOT\Directory\shell\powershell]
@="Open PowerShell Here"
[HKEY_CLASSES_ROOT\Directory\shell\powershell\command]
@="\"C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe\" -NoExit -ExecutionPolicy RemoteSigned -Command Set-Location -LiteralPath \"%L\""
