Forum Discussion
wallby
Aug 24, 2022Copper Contributor
How to prompt for program to open file with using powershell
Hello, I know that.. Start-Process -FilePath <path to file> .. opens the file at path to file, however is it possible to, instead of opening with the default program, open the pro...
- Aug 26, 2022
Answer was given here.. https://docs.microsoft.com/en-us/answers/questions/981421/how-to-prompt-for-program-to-open-file-with-using.html
The answer..
Use openwith.
$ps = new-object System.Diagnostics.Process $ps.StartInfo.Filename = "openwith.exe" $ps.StartInfo.Arguments = "C:\temp\xxxxxxxx.txt" $ps.start()
wallby
Aug 26, 2022Copper Contributor
Answer was given here.. https://docs.microsoft.com/en-us/answers/questions/981421/how-to-prompt-for-program-to-open-file-with-using.html
The answer..
Use openwith.
$ps = new-object System.Diagnostics.Process
$ps.StartInfo.Filename = "openwith.exe"
$ps.StartInfo.Arguments = "C:\temp\xxxxxxxx.txt"
$ps.start()