How to add 'Edit or Run with' to the right-click menu of PS1 files

The Edit or Run with context menu includes the following items for PS1 files:

  1. Run with PowerShell
  2. Run with PowerShell as administrator
  3. Run with PowerShell 7
  4. Run with PowerShell 7 as administrator
  5. Edit with PowerShell ISE
  6. Edit with PowerShell ISE as administrator
  7. Edit with PowerShell ISE (x86)
  8. Edit with PowerShell ISE (x86) as administrator
  9. Edit with Notepad
  10. Edit with Notepad as administrator

How to add 'Edit or Run with' to the right-click menu of PS1 files Picture 1

How to add "Edit or Run with" to the right-click menu of PS1 files in Windows 10

Here's how to do it:

Step 1. Do step 2 (add - right click), step 3 (add - Shift + right click) or step 4 (delete) below depending on what you want to do.

Step 2. To add the "Edit or Run with" PS1 file context menu (just right-click to show it), download the Add_Edit_or_Run_with_to_PS1_context_menu.reg file.

Contents of REG file) - Code:

Windows Registry Editor Version 5.00 [-HKEY_CLASSES_ROOT.ps1] [HKEY_CLASSES_ROOT.ps1] @="Microsoft.PowerShellScript.1" [-HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1] [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1] "EditFlags"=dword:00020000 " =hex(2):40.00,22,00,25,00,73,00,79,00,73,00,74,00,65,00,6d, 00,72,00,6f,00, 6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00.6d,00,33,00,32,00.5c, 00,77,00,69,00,6e,00,64,00,6f,00,77,00,73,00,70.00,6f,00,77,00,65,00,72,00, 73,00,68,00,65,00,6c,00,6c,00.5c,00,76,00,31,00,2e,00,30.00, 5c,00,70,00.6f, 00,77,00,65,00,72,00,73,00,68,00,65,00,6c,00,6c,00,2e,00,65,00,78,00,65,00, 22.00.2c,00,2d,00,31,00,30.00,33,00.00,00 [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1DefaultIcon] @=""C:WindowsSystem32WindowsPowerShellv1.0 powershell_ise.exe",1"[HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1Shell] @="Open" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellOpenCommand] @=""C:WindowsSystem32notepad.exe" "%1"" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit-Run-with] "MUIVerb"="Edit or Run with" "Extended"=- "SubCommands"="" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit-Run-withshell01flyout] "MUIVerb"="Run with PowerShell" "Icon"="powershell.exe" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit-Run-withshell01flyoutCommand] @=""C:WindowsSystem32WindowsPowerShellv1.0powershell.exe" "-Command" "if((Get-ExecutionPolicy ) -ne 'AllSigned') { Set-ExecutionPolicy -Scope Process Bypass }; & '%1'"" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit-Run-withshell02flyout] "MUIVerb"="Run with PowerShell as administrator" "HasLUashield"="" "Icon"="powershell.exe" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit-Run -withshell02flyoutCommand] @=""C:WindowsSystem32WindowsPowerShellv1.0powershell.exe" "-Command" ""& {Start-Process PowerShell.exe -ArgumentList '-ExecutionPolicy RemoteSigned -File "%1 "' -Verb RunAs}"" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit-Run-withshell03flyout] "MUIVerb"="Run with PowerShell 7" "Icon"="pwsh.exe" "CommandFlags"=dword:00000020 [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript .1ShellEdit-Run-withshell03flyoutCommand] @=""C:Program FilesPowerShell7pwsh.exe" "-Command" "if((Get-ExecutionPolicy ) -ne 'AllSigned') { Set-ExecutionPolicy -Scope Process Bypass }; & '%1'"" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit-Run-withshell04flyout] "MUIVerb"="Run with PowerShell 7 as administrator" "HasLUAShield"="" "Icon"="pwsh.exe" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript. 1ShellEdit-Run-withshell04flyoutCommand] @=""C:Program FilesPowerShell7pwsh.exe" "-Command" ""& {Start-Process pwsh.exe -ArgumentList '-ExecutionPolicy RemoteSigned -File "%1 "' -Verb RunAs}"" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit-Run-withshell05flyout] "MUIVerb"="Edit with PowerShell ISE" "Icon"="powershell_ise.exe" "CommandFlags"=dword:00000020 [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit-Run-withshell05flyoutCommand] @=""C: WindowsSystem32WindowsPowerShellv1.0powershell_ise.exe" "%1"" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit-Run-withshell06flyout] "MUIVerb"="Edit with PowerShell ISE as administrator" "HasLUAShield"="" "Icon "="powershell_ise.exe" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit-Run-withshell06flyoutCommand] @="PowerShell -windowstyle hidden -Command "Start-Process cmd -ArgumentList '/s,/c,start PowerShell_ISE.exe ""%1" "'-Verb RunAs"" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit-Run-withshell07flyout] "MUIVerb"="Edit with PowerShell ISE (x86)" "Icon"="powershell_ise.exe" "CommandFlags"=dword:00000020 [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript 1ShellEdit-Run-withshell07flyoutCommand] @=""C:WINDOWSsyswow64WindowsPowerShellv1.0powershell_ise.exe" "%1"" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit-Run-withshell08flyout] "MUIVerb"="Edit with PowerShell ISE (x86) as administrator" "HasLUAShield"="" "Icon"="powershell_ise.exe" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit-Run-withshell08flyoutCommand] @="PowerShell -windowstyle hidden -Command "Start-Process cmd -ArgumentList '/s,/c,start C:WINDOWSsyswow64WindowsPowerShellv1.0powershell_ise.exe ""%1""' -Verb RunAs"" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit-Run -withshell09flyout] "MUIVerb"="Edit with Notepad" "Icon"="notepad.exe" "CommandFlags"=dword:00000020 [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit-Run-withshell09flyoutCommand] @=""C:WindowsSystem32 notepad.exe" "%1"" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit-Run-withshell10flyout] "MUIVerb"="Edit with Notepad as administrator" "HasLUAShield"="" "Icon"="notepad.exe" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript .1ShellEdit-Run-withshell10flyoutCommand] @="PowerShell -windowstyle hidden -Command "Start-Process cmd -ArgumentList '/s,/c,start C:WindowsSystem32notepad.exe ""%1""' -Verb RunAs""

Step 3. To add the "Edit or Run with" PS1 file context menu (Shift + right-click to display), download the Add_Shift + Edit_or_Run_with_to_PS1_context_menu.reg file.

Contents of file REG - Code:

Windows Registry Editor Version 5.00 [-HKEY_CLASSES_ROOT.ps1] [HKEY_CLASSES_ROOT.ps1] @="Microsoft.PowerShellScript.1" [-HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1] [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1] "EditFlags"=dword:00020000 " =hex(2):40.00,22,00,25,00,73,00,79,00,73,00,74,00,65,00,6d, 00,72,00,6f,00, 6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00.6d,00,33,00,32,00.5c, 00,77,00,69,00,6e,00,64,00,6f,00,77,00,73,00,70.00,6f,00,77,00,65,00,72,00, 73,00,68,00,65,00,6c,00,6c,00.5c,00,76,00,31,00,2e,00,30.00,5c,00,70,00.6f, 00,77,00,65,00,72,00,73,00,68,00,65,00,6c,00,6c,00,2e,00,65,00,78,00,65,00, 22.00.2c,00,2d,00,31,00,30.00,33,00.00,00 [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1DefaultIcon] @=""C:WindowsSystem32WindowsPowerShellv1.0 powershell_ise.exe",1"[HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1Shell] @="Open" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellOpenCommand] @=""C:WindowsSystem32notepad.exe" "%1"" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit-Run-with] "MUIVerb"="Edit or Run with" "Extended"="" "SubCommands"="" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit-Run-withshell01flyout] "MUIVerb"="Run with PowerShell" "Icon"="powershell.exe " [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit-Run-withshell01flyoutCommand] @=""C:WindowsSystem32WindowsPowerShellv1.0powershell.exe" "-Command" "if((Get-ExecutionPolicy ) -ne 'AllSigned'" ) { Set-ExecutionPolicy -Scope Process Bypass };& '%1'"" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit-Run-withshell02flyout] "MUIVerb"="Run with PowerShell as administrator" "HasLUAShield"="" "Icon"="powershell.exe" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit -Run-withshell02flyoutCommand] @=""C:WindowsSystem32WindowsPowerShellv1.0powershell.exe" "-Command" ""& {Start-Process PowerShell.exe -ArgumentList '-ExecutionPolicy RemoteSigned -File " %1"' -Verb RunAs}"" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit-Run-withshell03flyout] "MUIVerb"="Run with PowerShell 7" "Icon"="pwsh.exe" "CommandFlags"=dword:00000020 [HKEY_CLASSES_ROOTMicrosoft .PowerShellScript.1ShellEdit-Run-withshell03flyoutCommand] @=""C:Program FilesPowerShell7pwsh.exe" "-Command" "if((Get-ExecutionPolicy ) -ne 'AllSigned') { Set-ExecutionPolicy -Scope Process Bypass }; & '%1'"" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit-Run-withshell04flyout] "MUIVerb"="Run with PowerShell 7 as administrator" "HasLUAShield"="" "Icon"="pwsh.exe" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript. 1ShellEdit-Run-withshell04flyoutCommand] @=""C:Program FilesPowerShell7pwsh.exe" "-Command" ""& {Start-Process pwsh.exe -ArgumentList '-ExecutionPolicy RemoteSigned -File "%1 "' -Verb RunAs}"" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit-Run-withshell05flyout] "MUIVerb"="Edit with PowerShell ISE" "Icon"="powershell_ise.exe" "CommandFlags"=dword:00000020 [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit-Run-withshell05flyoutCommand] @=""C: WindowsSystem32WindowsPowerShellv1.0powershell_ise.exe" "%1"" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit-Run-withshell06flyout] "MUIVerb"="Edit with PowerShell ISE as administrator" "HasLUAShield"="" "Icon "="powershell_ise.exe" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit-Run-withshell06flyoutCommand] @="PowerShell -windowstyle hidden -Command "Start-Process cmd -ArgumentList '/s,/c,start PowerShell_ISE.exe ""%1" "'-Verb RunAs"" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit-Run-withshell07flyout] "MUIVerb"="Edit with PowerShell ISE (x86)" "Icon"="powershell_ise.exe" "CommandFlags"=dword:00000020 [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript 1ShellEdit-Run-withshell07flyoutCommand] @=""C:WINDOWSsyswow64WindowsPowerShellv1.0powershell_ise.exe" "%1"" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit-Run-withshell08flyout] "MUIVerb"="Edit with PowerShell ISE (x86) as administrator" "HasLUAShield"="" "Icon"="powershell_ise.exe" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit-Run-withshell08flyoutCommand] @="PowerShell -windowstyle hidden -Command "Start-Process cmd -ArgumentList '/s,/c,start C:WINDOWSsyswow64WindowsPowerShellv1.0powershell_ise.exe ""%1""' -Verb RunAs"" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit-Run -withshell09flyout] "MUIVerb"="Edit with Notepad" "Icon"="notepad.exe" "CommandFlags"=dword:00000020 [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit-Run-withshell09flyoutCommand] @=""C:WindowsSystem32 notepad.exe" "%1"" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit-Run-withshell10flyout] "MUIVerb"="Edit with Notepad as administrator" "HasLUAShield"="" "Icon"="notepad.exe" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript .1ShellEdit-Run-withshell10flyoutCommand] @="PowerShell -windowstyle hidden -Command "Start-Process cmd -ArgumentList '/s,/c,start C:WindowsSystem32notepad.exe ""%1""' -Verb RunAs""

Step 4. To remove the "Edit or Run with" PS1 file context menu, download the Remove_Edit_or_Run_with_from_PS1_context_menu.reg file.

Contents of file REG - Code:

Windows Registry Editor Version 5.00 [-HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit-Run-with]

Step 5. Save the .reg file to the desktop.

Step 6. Double-click the downloaded .reg file to merge.

Step 7. When prompted, click Run > Yes (UAC) > Yes > OK to approve the merge.

Step 8. Now you can delete the downloaded .reg file if you want.

Hope you are succesful.

4 ★ | 1 Vote

May be interested

  • Integrate download support into Chrome's right-click menuIntegrate download support into Chrome's right-click menu
    google chrome now supports downloading files with idm, but can only be used after you click on the link. the following tips will help you integrate idm into the right-click menu on google chrome.
  • How to Edit PDF FilesHow to Edit PDF Files
    this article shows you how to edit pdf files with adobe's acrobat pro dc software or convert pdf files to microsoft word format. if you are looking for a way to edit pdf files for free, use libreoffice draw, but it has fewer features than adobe acrobat pro dc.
  • How to Change the Volume on a MacHow to Change the Volume on a Mac
    to mute, decrease, or increase the volume on your mac, press , , or on your keyboard, respectively. to enable the volume slider in the menu bar, click the apple menu → click system preferences → click sound → check the 'show volume in menu ...
  • Add the option to Mount right-click menu in Windows 8Add the option to Mount right-click menu in Windows 8
    with versions from windows 8 and above, microsoft has assisted users in using iso and img file packages via the mount option integrated in the right-click menu without the need for virtual drive creation software. however, for some reason, this option may not appear on your computer. but don't worry, we'll show you how to add this feature in the article below. please take a look.
  • How to edit directly on PDF files like Word filesHow to edit directly on PDF files like Word files
    how to edit directly on pdf files like word files. pdf files are increasingly popular for sharing documents or printing because of their high security and compact file size, opening up quickly. however, editing on pdf files is quite difficult
  • How to Edit a DVDHow to Edit a DVD
    there are many programs that you can use to edit a dvd (digital versatile disc). each dvd editing software can edit content by either importing the vob (dvd video object) files directly or converting dvd files into files that the software...
  • How to fix Open with missing errors in the right-click menuHow to fix Open with missing errors in the right-click menu
    open with on the right-click menu allows you to open data with a variety of applications. however, because you accidentally deleted open with, how to get it back?
  • How to Change the Color of Menu Buttons on a MacHow to Change the Color of Menu Buttons on a Mac
    to change the button and highlight color on a mac, click the apple menu → click system preferences → click general → choose your color preferences. click on the apple menu. it's the apple logo at the top left of the menu...
  • 2 simple ways to remove SkyDrive Pro option in Windows 10 Right-click Menu2 simple ways to remove SkyDrive Pro option in Windows 10 Right-click Menu
    when installing microsoft office 2013, by default your context menu (context menu) will appear with skydrive pro option. however, every time you click on any file and folder, this option always appears on the context menu (context menu) that makes you feel uncomfortable.
  • How to Change How Long Until a Mac Asks for Your PasswordHow to Change How Long Until a Mac Asks for Your Password
    to change how long until your mac asks for a password, click the apple menu → click system preferences → click security & privacy → click the require password menu to select a new time. click the apple menu. this is in the upper-left corne...