I have a ps1 file that is opened by default with Notepad. If I right click this file and choose Run with Powershell, the commands inside the file are correctly run.
But I would like Powershell
to be the default program to run
(not "open") this file. So, if I just right click the file, then open with, then choose default program and choose Windows Powershell
, this is not enough, because the commands are not run. In this way, the file is just "opened", the Powershell windows opens and then disappears after a second.
How could I set Powershell
to be the default program to RUN .ps1
files, or at least one particular .ps1
file?