7

I seem to have lost the right-click Edit action for *.ps1 files which used to launch Powershell ISE. How can I get it back?

I think it must have happened after I installed and uninstalled PowerGui.

shamp00
  • 321
  • 4
  • 11

1 Answers1

7

This happened to me as well. Import the following as a .reg file to fix it. I made a tweak that causes the default shell action (double click) to use the edit command (ISE) instead of open (notepad.exe). If you don't care for that, simply change line 7 to @="Open"

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\DefaultIcon]
@="\"C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell_ise.exe\",1"

[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\Shell]
@="Edit"

[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\Shell\Edit]

[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\Shell\Edit\Command]
@="\"C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell_ise.exe\" \"%1\""

[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\Shell\Open]

[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\Shell\Open\Command]
@="\"C:\\Windows\\System32\\notepad.exe\" \"%1\""
wtjones
  • 216
  • 1
  • 5