Custom "Open with..." dialog does not work in Tota

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
Eddie1506
Junior Member
Junior Member
Posts: 32
Joined: 2004-05-23, 19:57 UTC

Custom "Open with..." dialog does not work in Tota

Post by *Eddie1506 »

Hi,

There is a "hack" for Windows 7, that allows changing the "Open with..." dialog to uncheck by default the option "Always use the selected program..." for unknown file types.

The hack is described here in detail:
http://blogs.msmvps.com/dmartin/blog/2011/11/09/how-to-display-the-open-with-dialog-box-with-the-always-associate-this-program-checkbox-unchecked-by-default-part-iii/

It requires a DLL to be copied to system32 folder and an entry modified in the registry.

The registry entry originally lists the command that is performed when opening a file with unknown file type (HKEY_CLASSES_ROOT\Unknown\shell\opendlg\command) and the registry hack changes the command to point from shell32.dll to DLL that was copied to system32 folder.

This hack works like a charm in Windows Explorer, but unfortunatelly it does not work in Total Commander. The checkbox stays checked, most likely because Total Commander directly calls shell32.dll methods instead of using the registry to find out what to call.

Is there anything that can be done to fix this?

Windows 7 Pro x64 / TotalCmd 8.01 x64

Thanks!
Last edited by Eddie1506 on 2013-01-30, 15:07 UTC, edited 1 time in total.
User avatar
Horst.Epp
Power Member
Power Member
Posts: 7025
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Post by *Horst.Epp »

No need for a fix, TC behaves as any normal user expects.
Eddie1506
Junior Member
Junior Member
Posts: 32
Joined: 2004-05-23, 19:57 UTC

Post by *Eddie1506 »

Horst.Epp wrote:No need for a fix, TC behaves as any normal user expects.
Haha, maybe I misspoke, I wanted to say "Is there anything that can be done to *change*" this", that is, make it behave like Windows Explorer.

P.S. I wouldn't call any Total Commander user "normal" in broad sense of the word ;)
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50923
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I guess that this happens because the the code in TC against DLL injection - that's exactly what you do, inject a DLL to replace a system DLL. This is blocked in TC as a precaution against viruses/worms.

You can re-enable the loading of injected DLLs like this: Add the following line to wincmd.ini uder [Configuration]
DllLoad=1
Author of Total Commander
https://www.ghisler.com
Eddie1506
Junior Member
Junior Member
Posts: 32
Joined: 2004-05-23, 19:57 UTC

Post by *Eddie1506 »

ghisler(Author) wrote:I guess that this happens because the the code in TC against DLL injection - that's exactly what you do, inject a DLL to replace a system DLL. This is blocked in TC as a precaution against viruses/worms.

You can re-enable the loading of injected DLLs like this: Add the following line to wincmd.ini uder [Configuration]
DllLoad=1
Thanks, I'll try it tomorrow!
Eddie1506
Junior Member
Junior Member
Posts: 32
Joined: 2004-05-23, 19:57 UTC

Post by *Eddie1506 »

ghisler(Author) wrote:I guess that this happens because the the code in TC against DLL injection - that's exactly what you do, inject a DLL to replace a system DLL. This is blocked in TC as a precaution against viruses/worms.

You can re-enable the loading of injected DLLs like this: Add the following line to wincmd.ini uder [Configuration]
DllLoad=1
Hi Christian,

this works only partially. If I double click the file with unknown extension, it doesn't work. However, If I rightclick on the file and select "Open" then it does work.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50923
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I meant the right click menu - the double click is handled by TC internally.
Author of Total Commander
https://www.ghisler.com
Eddie1506
Junior Member
Junior Member
Posts: 32
Joined: 2004-05-23, 19:57 UTC

Post by *Eddie1506 »

ghisler(Author) wrote:I meant the right click menu - the double click is handled by TC internally.
I presume there's no way to change that behaviour?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50923
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I'm using ShellExecuteEx for the double click - apparently your hack does not support that, only the right click menu method.
Author of Total Commander
https://www.ghisler.com
Eddie1506
Junior Member
Junior Member
Posts: 32
Joined: 2004-05-23, 19:57 UTC

Post by *Eddie1506 »

Alright, thanks!
Eddie1506
Junior Member
Junior Member
Posts: 32
Joined: 2004-05-23, 19:57 UTC

Post by *Eddie1506 »

I see that now this works with TotalCMD 8.5, so thank you Christian :)
Post Reply