I need to open a file with an app that is not a default app for this file, in other words to right click on a file and go to open with, and select the app I want to open the file with, is there a way to create a flow for that in PA?
Asked
Active
Viewed 5,069 times
1 Answers
1
You can use the System -> Run application
action to start almost anything with almost any file.
Suppose you have a file "myfile.csv" with full path in
variable MyFile
, and
you would like to open it with Notepad instead of default Excel.
First, you need to have the location of the executable, which you can find easily in PowerShell using the following dialog (note: XXXX denotes current user):
PS > where.exe notepad
C:\Windows\System32\notepad.exe
C:\Windows\notepad.exe
C:\Users\XXXX\AppData\Local\Microsoft\WindowsApps\notepad.exe
With that, you would add action Run application
with application name "C:\Windows\System32\notepad.exe" and argument %MyFile%
. For After application launch, select "Wait for application to load". You'll get an application
process ID and window handle back to use for any UI
automation. For example, Focus window can use a window handle.

VirtualScooter
- 1,792
- 3
- 18
- 28