How can I invoke PhotoViewer within TC internal association?

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
ktp
Junior Member
Junior Member
Posts: 17
Joined: 2014-03-16, 07:16 UTC

How can I invoke PhotoViewer within TC internal association?

Post by *ktp »

Hello,

The Windows PhotoViewer is not a standalone exe, but a dll invoked with:
%SystemRoot%\System32\rundll32.exe "%ProgramFiles%\Windows Photo Viewer\PhotoViewer.dll", ImageView_Fullscreen (/path/image_name)

My question is: how to invoke PhotoViewer using TC internal association? Because using double quote or single quote does not work.

Double quote:
Filter6_Open-PhotoViewer=""%SystemRoot%\System32\rundll32.exe "%ProgramFiles%\Windows Photo Viewer\PhotoViewer.dll", ImageView_Fullscreen" "%1""

Single quote:
Filter6_Open-PhotoViewer=""%SystemRoot%\System32\rundll32.exe '%ProgramFiles%\Windows Photo Viewer\PhotoViewer.dll', ImageView_Fullscreen" "%1""

By the way, by running from command prompt, I also observed that the "/path/image_name" could not be enclosed with quote,
to be understood by PhotoViewer, so there is a problem when the image_name contains spaces in its name.

Thank you in advance.
User avatar
Dalai
Power Member
Power Member
Posts: 9965
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: How can I invoke PhotoViewer within TC internal association?

Post by *Dalai »

This will work:

Code: Select all

%SystemRoot%\System32\rundll32.exe "%ProgramFiles%\Windows Photo Viewer\PhotoViewer.dll",ImageView_Fullscreen %1
For some reason the %1 must not be quoted. That's the command Windows has in the registry (HKEY_CLASSES_ROOT\Applications\photoviewer.dll\shell\open\command).

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
User avatar
petermad
Power Member
Power Member
Posts: 16032
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: How can I invoke PhotoViewer within TC internal association?

Post by *petermad »

I just use:

Code: Select all

rundll32 shimgvw.dll,ImageView_Fullscreen %1
and it works fine
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
ktp
Junior Member
Junior Member
Posts: 17
Joined: 2014-03-16, 07:16 UTC

Re: How can I invoke PhotoViewer within TC internal association?

Post by *ktp »

@Dalai
Thank you for your explanation.

@petermad
Thank you very much. It works for me, regardless that the image file name has spaces or not.
So the final command in my wincmd.ini is:
Filter6_open-PhotoViewer="rundll32.exe shimgvw.dll,ImageView_Fullscreen %1"
Post Reply