I have a very powershell script that works perfectly and does:
Param(
[string]$fileName
)
echo \"Woo I opened $fileName\"
When I run it on
Use the proper tools for the job:
cmd /c assoc .fob=foobarfile
cmd /c ftype foobarfile=powershell.exe -File `"C:\path\to\your.ps1`" `"%1`"
Note that both assoc and ftype are CMD-builtins, so you need to run them via cmd /c
from PowerShell.
For files without extension use this association:
cmd /c assoc .=foobarfile