Created
July 25, 2025 10:17
-
-
Save NickSlash/3f14e9e48328ba7ef10b49d17fedb0ee to your computer and use it in GitHub Desktop.
File Extension (.ps1x) to make scripts execute when opened/clicked instead of opening in editor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Windows Registry Editor Version 5.00 | |
| [HKEY_CLASSES_ROOT\.ps1x] | |
| @="ps1xfile" | |
| [HKEY_CLASSES_ROOT\ps1xfile] | |
| @="PowerShell Executable Script (.ps1x)" | |
| [HKEY_CLASSES_ROOT\ps1xfile\DefaultIcon] | |
| @="C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe,0" | |
| [HKEY_CLASSES_ROOT\ps1xfile\shell] | |
| [HKEY_CLASSES_ROOT\ps1xfile\shell\open] | |
| @="Run with PowerShell" | |
| [HKEY_CLASSES_ROOT\ps1xfile\shell\open\command] | |
| @=hex(2):25,00,57,00,49,00,4e,00,44,00,49,00,52,00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,57,00,69,00,6e,00,64,00,6f,00,77,00,73,00,50,00,6f,00,77,00,65,00,72,00,53,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,20,00,2d,00,45,00,78,00,65,00,63,00,75,00,74,00,69,00,6f,00,6e,00,50,00,6f,00,6c,00,69,00,63,00,79,00,20,00,42,00,79,00,70,00,61,00,73,00,73,00,20,00,2d,00,4e,00,6f,00,50,00,72,00,6f,00,66,00,69,00,6c,00,65,00,20,00,2d,00,43,00,6f,00,6d,00,6d,00,61,00,6e,00,64,00,20,00,22,00,47,00,65,00,74,00,2d,00,43,00,6f,00,6e,00,74,00,65,00,6e,00,74,00,20,00,2d,00,52,00,61,00,77,00,20,00,2d,00,50,00,61,00,74,00,68,00,20,00,27,00,25,00,31,00,27,00,20,00,7c,00,20,00,49,00,6e,00,76,00,6f,00,6b,00,65,00,2d,00,45,00,78,00,70,00,72,00,65,00,73,00,73,00,69,00,6f,00,6e,00,22,00,00,00 | |
| ;ExpandString(%WINDIR%\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -NoProfile -Command "Get-Content -Raw -Path '%1' | Invoke-Expression") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment