- Larry
Martin
"Larry__Weiss" <l...@airmail.net> wrote in message
news:O0geeWXY...@TK2MSFTNGP04.phx.gbl...
- Larry
Martin
"Larry__Weiss" <l...@airmail.net> wrote in message
news:ugIfXagY...@TK2MSFTNGP04.phx.gbl...
assoc.exe
ftype.exe
to change a file's "open" action association.
The PowerShell part should be straightforward after that.
(Again, PowerShell makes me learn many new things!)
- Larry
FTYPE and ASSOC are built-in commands for CMD.exe. They are not native
executables, and cannot be invoked from powershell (or anything
outside of cmd.exe for that matter). The fact you can invoke them
with ftype.exe is an artifact of the command search algorithm.
ftype.com also works, as does the funny-looking cls.exe, cls.com,
cls.bat or anything in %PATHEXT%:
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
Hope this helps,
-Oisin
To invoke built-in commands to cmd.exe from PowerShell you just execute cmd.exe
with the /c parameter. For example
cmd /c ftype /?
cmd /c assoc /?
- Larry