I have a very powershell script that works perfectly and does:
Param(
[string]$fileName
)
echo \"Woo I opened $fileName\"
When I run it on
I don't think you can do it through Windows UI.
The goal here is to associate a type with powershell.exe, arguments to which will be
To do this
Regedit.exe
. //disclaimer: you are editing Windows registry. Here be tigers..
, e.g. if you want to associate *.zbs - create a key .zbs
zbsfile
-- this is a reference linking your extension to a filetype.zbsfile
- this is your filetypezbsfile
shell
open
command
command
, set (default) value to e.g.powershell.exe -File "C:\path\to your\file.ps1" "%1"
That should work.
EDIT:
or (crazy idea), create a bat file doing just powershell.exe -File "C:\path\to your\file.ps1" "%%1"
and select it in Windows UI...