- May
- 13,215
- 180
Here's a little Powershell script.
It works (opens the Properties dialog) in Powershell if I give it a foldername and a filename; for example,
{code]PS> cmenu.psi d:\tc26 tcc.exe[/code]
If, instead of arg[0] and arg[1], I hard-code a foldername and a file name, it runs OK with TCC's PSHELL.
But I can't figure out how call it with PSHELL providing two arguments to the script.
Code:
# cmenu.ps1
$o = new-object -com "Shell.Application"
$folder = $o.NameSpace($args[0])
$file = $folder.ParseName($args[1])
$file.InvokeVerb("Properties")
It works (opens the Properties dialog) in Powershell if I give it a foldername and a filename; for example,
{code]PS> cmenu.psi d:\tc26 tcc.exe[/code]
If, instead of arg[0] and arg[1], I hard-code a foldername and a file name, it runs OK with TCC's PSHELL.
But I can't figure out how call it with PSHELL providing two arguments to the script.