ChristianL
Member
- Local time
- 4:10 AM
- Posts
- 2
- OS
- Windows 11 Education
Hello,
On Windows 10 I was able to modify the file association by using the following command :
Set-ItemProperty -Path "Registry::HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\Shell\Open\Command" -Name '(Default)' -Value '"C:\Program Files\PowerShell\7\pwsh.exe" -noLogo -ExecutionPolicy bypass -file "%1"'
This command no longer works on Windows 11 because the registry location does not exist. I need a way to make PS scripts to run with a double click and the solution must be in a form of a command , No GUI solutions please.
Thanks
On Windows 10 I was able to modify the file association by using the following command :
Set-ItemProperty -Path "Registry::HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\Shell\Open\Command" -Name '(Default)' -Value '"C:\Program Files\PowerShell\7\pwsh.exe" -noLogo -ExecutionPolicy bypass -file "%1"'
This command no longer works on Windows 11 because the registry location does not exist. I need a way to make PS scripts to run with a double click and the solution must be in a form of a command , No GUI solutions please.
Thanks
- Windows Build/Version
- 21H2
My Computer
System One
-
- OS
- Windows 11 Education
- Computer type
- Laptop
- Manufacturer/Model
- Dell
- CPU
- Intel i9-10885H 2.4Ghz
- Motherboard
- Dell
- Memory
- 32 GB
- Graphics Card(s)
- GTX 1650 TI
- Monitor(s) Displays
- 2
- Screen Resolution
- 3840x2400
- Hard Drives
- SSD - 1Tb
- Browser
- Edge
- Antivirus
- Sophos