Button to open file in UWP App (Xodo) - Windows 'app'

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
risk
Junior Member
Junior Member
Posts: 85
Joined: 2007-07-30, 03:18 UTC

Button to open file in UWP App (Xodo) - Windows 'app'

Post by *risk »

I installed and testing out Xodo, a Universal Windows Platforms (Windows Store) app. How do I create a button in TC to open a file in Xodo without making it the Windows default PDF reader?

Thank you in advance.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Button to open file in UWP App (Xodo)

Post by *ghisler(Author) »

Try creating a link (e.g. on the desktop) to the app, then add that link to the button bar, with parameters %P%N.
Author of Total Commander
https://www.ghisler.com
User avatar
Dalai
Power Member
Power Member
Posts: 9364
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: Button to open file in UWP App (Xodo)

Post by *Dalai »

Windows Apps can be launched by Win32 applications like this:

Code: Select all

"%SystemRoot%\explorer.exe" shell:appsFolder\<Vendor>.<Name_and_ID_of_the_App>!App
The app's name and ID must be determined beforehand, e.g. via PowerShell Get-AppxPackage command.

Example for some random app:

Code: Select all

"%SystemRoot%\explorer.exe" shell:appsFolder\Microsoft.RingDoorbell_8wfdcxeq7xacm!App
Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Jerez
Junior Member
Junior Member
Posts: 27
Joined: 2003-02-23, 22:40 UTC

Re: Button to open file in UWP App (Xodo)

Post by *Jerez »

Thanks... unfortunately it does not work.

Using DRAWBOARD as the WIN10 app:

1.The shortcut method, opens DRAWBOARD, but it does not open the file. I used the %P%N parameters as recommended.
2. The second method opens an explorer window. However, WIN+R "%SystemRoot%\explorer.exe" shell:appsFolder\Drawboard.DrawboardPDF_gqbn7fs4pywxm!App opens the APP.

Other ideas would be appreciated. Thanks in advance,

Jerez
User avatar
Stefan2
Power Member
Power Member
Posts: 4133
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: Button to open file in UWP App (Xodo)

Post by *Stefan2 »

Jerez wrote: 2020-03-12, 18:01 UTC 1.The shortcut method, opens DRAWBOARD, but it does not open the file. I used the %P%N parameters as recommended.


Hi Jerez,

please right click at that button and chose "Copy",
next paste that copied button-code here into the forum so we can inspect.

Also you may want to google for something like "DRAWBOARD command line" to find some working code we can next adopt for TC use.



 
 
Jerez
Junior Member
Junior Member
Posts: 27
Joined: 2003-02-23, 22:40 UTC

Re: Button to open file in UWP App (Xodo)

Post by *Jerez »

Thanks Stefan2,

Below are the entries for the Button Bar, options (1) shortcut, and (2) appFolder. Note that the icon files direct to another, unrelated program (i.e. FlexiPDF.ext) . I searched about drawboard support of command line file opening, and apparently there is none. Thus, it makes sense the TC Button Bar command does not support it! I guess TC support would have to be through the right chick/open with method, if this is posslble.

Cordially,

Jerez


1.************
TOTALCMD#BAR#DATA
e:\users\J....\Desktop\Drawboard PDF.lnk
%P%N
C:\Program Files (x86)\SoftMaker\FlexiPDF 2019\FlexiPDF.exe,35

%P

-1

2. **************
TOTALCMD#BAR#DATA
"%SystemRoot%\explorer.exe" shell:appsFolder\Drawboard.DrawboardPDF_gqbn7fs4pywxm!App
%P%N
C:\Program Files (x86)\SoftMaker\FlexiPDF 2019\FlexiPDF.exe,35

%P

-1
avada
Senior Member
Senior Member
Posts: 217
Joined: 2007-10-05, 06:24 UTC

Re: Button to open file in UWP App (Xodo)

Post by *avada »

Dalai wrote: 2020-03-11, 18:51 UTC Windows Apps can be launched by Win32 applications like this:

Code: Select all

"%SystemRoot%\explorer.exe" shell:appsFolder\<Vendor>.<Name_and_ID_of_the_App>!App
The app's name and ID must be determined beforehand, e.g. via PowerShell Get-AppxPackage command.

Example for some random app:

Code: Select all

"%SystemRoot%\explorer.exe" shell:appsFolder\Microsoft.RingDoorbell_8wfdcxeq7xacm!App
Regards
Dalai
How do I get proper app IDs? How do I get the icon?
Windows 10
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Button to open file in UWP App (Xodo) - Windows 'app'

Post by *petermad »

How do I get proper app IDs? How do I get the icon?
viewtopic.php?f=3&t=68623

There will usually be a lot of .png icons in the appsfolder.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
avada
Senior Member
Senior Member
Posts: 217
Joined: 2007-10-05, 06:24 UTC

Re: Button to open file in UWP App (Xodo) - Windows 'app'

Post by *avada »

petermad wrote: 2021-04-11, 16:15 UTC
How do I get proper app IDs? How do I get the icon?
viewtopic.php?f=3&t=68623

There will usually be a lot of .png icons in the appsfolder.
Too bad TC can't use PNG files.
Windows 10
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6450
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Button to open file in UWP App (Xodo) - Windows 'app'

Post by *Horst.Epp »

avada wrote: 2021-04-13, 18:34 UTC
petermad wrote: 2021-04-11, 16:15 UTC
How do I get proper app IDs? How do I get the icon?
viewtopic.php?f=3&t=68623

There will usually be a lot of .png icons in the appsfolder.
Too bad TC can't use PNG files.
No problem here to assign a .png icon to an TC button.
You have to set the file mask to *.* of course
Windows 11 Home x64 Version 23H2 (OS Build 22631.3374)
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69
QAP 11.6.3.2 x64
avada
Senior Member
Senior Member
Posts: 217
Joined: 2007-10-05, 06:24 UTC

Re: Button to open file in UWP App (Xodo) - Windows 'app'

Post by *avada »

Horst.Epp wrote: 2021-04-13, 19:59 UTC
avada wrote: 2021-04-13, 18:34 UTC
petermad wrote: 2021-04-11, 16:15 UTC
viewtopic.php?f=3&t=68623

There will usually be a lot of .png icons in the appsfolder.
Too bad TC can't use PNG files.
No problem here to assign a .png icon to an TC button.
You have to set the file mask to *.* of course
Except that it utterly fails. The image viewer app's icon ends up being used, instead of the actual png file.
Windows 10
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Button to open file in UWP App (Xodo) - Windows 'app'

Post by *petermad »

2avada

Then convert the png to ico and use that. Troublesome? Yes, thank Microsoft for that with their pathetic Metro Apps.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Post Reply