-
Notifications
You must be signed in to change notification settings - Fork 0
/
WindowsPowerShell.reg
28 lines (22 loc) · 1.43 KB
/
WindowsPowerShell.reg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Windows Registry Editor Version 5.00
;
; 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\""