How can I associate a file type with a powershell script?
问题 I have a very powershell script that works perfectly and does: Param( [string]$fileName ) echo "Woo I opened $fileName" When I run it on the command line, it works: my-script.ps1 .\somefile Returns: Woo I opened somefile I would like to associate my-script.ps1 with a particular file type. I am attempting to do this via 'Open With' However: Windows doesn't include Powershell scripts as 'Programs' (though it considers CMD and batch scripts as 'Programs') When I pick 'All Files' instead, and