Author Topic: [SOLVED] MC using wrong app to open multiple files  (Read 1712 times)

bgroper

  • Newbie
  • *
  • Posts: 7
    • View Profile
[SOLVED] MC using wrong app to open multiple files
« on: December 06, 2024, 04:56:24 »
Hi forum
I'm using MC 14.4 (build 3047) on Windows 10 Pro-N.
I have Windows configured with FoxitReader as the default viewer for PDF files.
Also added *.pdf to File Type Setup in MC, with pointer to FoxitReader.
I can also see the xml elements and values saved in C:\Users\user\AppData\Roaming\MultiCommander\Config\FiteTypes.xml.
Using MC, a point and click at a single pdf file opens the file using the FoxitReader as expected.  Tick.
When MC has multiple pdf files selected (ie 2 or more files), they will all open using a different app.  A secondary PDF tool.
How do I make MC open multiple files in the selected default app, FoxitReader ?
Thanks for any tips or clues, and thanks for the great program.

Edit.  Yes, after making these changes I did restart windows, but the problem remains.   :(
« Last Edit: December 07, 2024, 10:20:04 by bgroper »

Jungle

  • Contributor
  • VIP Member
  • *****
  • Posts: 554
  • Old Skull
    • View Profile
Re: MC using wrong app to open multiple files
« Reply #1 on: December 06, 2024, 06:32:37 »
Some more to add.

1. It seems that the way of launching depends on Explorer tabs type.
E.g. from the RES1: tab my *.pdf files are opened in MS Edge (which is the default app). And from "normal" file tab the same files are opened in configured app (PDF-XChange)

2. If custom config settings are wrong, the file will not be opened from the "normal" file panel. And it's confusing when the default file icon is used. So you see some associated icon, try to launch and nothing happens. I think either the default app should be launched or some kind of notification displayed. Maybe MC should check certain settings at startup and warn a user in a some way.

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4484
    • View Profile
    • Multi Commander
Re: MC using wrong app to open multiple files
« Reply #2 on: December 06, 2024, 07:22:58 »
You are saying "view" So I guess you edit the "view" part in FileType Setup.?

When you click to "Open" file. you are not viewing them.. you are Opening them. so the "Open/Run" part in FileType Setup is used.

By default it is handled by windows and windows will open all of the files that MC send to Windows with the program associated with the file.
You can override that behaviour if you want, But then I don't think opening multiple is supported. But Then you can do that from Script and define you own command.



« Last Edit: December 06, 2024, 07:31:01 by Mathias (Author) »

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4484
    • View Profile
    • Multi Commander
Re: MC using wrong app to open multiple files
« Reply #3 on: December 06, 2024, 07:25:23 »
Some more to add.

1. It seems that the way of launching depends on Explorer tabs type.
E.g. from the RES1: tab my *.pdf files are opened in MS Edge (which is the default app). And from "normal" file tab the same files are opened in configured app (PDF-XChange)

2. If custom config settings are wrong, the file will not be opened from the "normal" file panel. And it's confusing when the default file icon is used. So you see some associated icon, try to launch and nothing happens. I think either the default app should be launched or some kind of notification displayed. Maybe MC should check certain settings at startup and warn a user in a some way.
RES is a normal panel. it is just showing content of virtual device RES1:,
Not sure why you get different behaviour. I get the same. Both are opened in edge

Jungle

  • Contributor
  • VIP Member
  • *****
  • Posts: 554
  • Old Skull
    • View Profile
Re: MC using wrong app to open multiple files
« Reply #4 on: December 06, 2024, 08:30:40 »
I've configured PDF-XChange as a Launcher (Run/Open), neither viewer nor editor.
When I launch *.pdf from a "normal" panel, some lines appear in the Application Log (Debug/Full)

Code: [Select]
2024-12-06 10:26:39.056 Execute file item : "x:\path\file.pdf"
2024-12-06 10:26:39.076 ShellExecute returned without any error

When I launch *.pdf from RES1:, nothing appears in the Application log.

bgroper

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: MC using wrong app to open multiple files
« Reply #5 on: December 07, 2024, 08:41:58 »
You are saying "view" So I guess you edit the "view" part in FileType Setup.?

When you click to "Open" file. you are not viewing them.. you are Opening them. so the "Open/Run" part in FileType Setup is used.

By default it is handled by windows and windows will open all of the files that MC send to Windows with the program associated with the file.
You can override that behaviour if you want, But then I don't think opening multiple is supported. But Then you can do that from Script and define you own command.

Sorry, I shouldn't use vague and misleading terminology.
Actually, I'm almost exclusively using the keyboard.  Not much mouse.
To select a few files, I'm using the keyboard shift and arrow keys.  Then just press Enter key.
I don't know whether the Enter key causes View or Open/Run actions.
In File Type Setup I've configured Foxit executable for *.pdf in both Viewers and Launchers(Run/Open) tabs.
Single files get opened by Foxit as expected, but when multiple files selected, a different (unwanted at this point) PDF app opens the selected files.
Please, is there some existing information about making a script to achieve my desired outcome ?
BTW, with Windows Explorer I can use keyboard to select multiple pdf files and then press Enter key.  The multiple files (nearly) instantly open in FoxitReader in separate tabs as expected.
TIA's for any tips or clues.
« Last Edit: December 07, 2024, 09:57:54 by bgroper »

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4484
    • View Profile
    • Multi Commander
Re: MC using wrong app to open multiple files
« Reply #6 on: December 07, 2024, 10:02:59 »
Return is Open/Run (unless it is a folder then it is Navigate into)


If you have multipe files select and to Open/Run (even via return key) all selected files are sent to Windows with the command to "Open" them.
If I do it for pdf I get a new instance of Edge with two tabs and a pdf in each.. and it is not MC that open edge. Windows does that because pdf is associated with that
Might be that Foxit does not support "Open" action with multiple files or something. I don't know. It is out of MCs control

If an unwanted app open the pdf. check your windows associations for pdf..  everything that is not overridden in filetype setup in MC is handed of to Windows. And Windows launch it depending on the filetype associations.

I don't know how foxit works.  Can you open multiple from command line with like "<exe name for foxit>.exe pdf1.pdf pdf2.pdf" then it should be possible to use scripting for it
or does it need a file with all files listed that it should open.. I seen some program work like "<name>.exe -l parameters.txt" and in parameters.txt all files to open are listed.
depending on how foxit work I think it should be possible to create a UserDefinedCommand for it. that you den assign to a hotkey to open them.



bgroper

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: [SOLVED] MC using wrong app to open multiple files
« Reply #7 on: December 07, 2024, 10:22:40 »
Thanks for your helps.
Yes, the problem comes from windoze, not MC.
I've managed to hack at the registry, and now multiple files are opening tabbed in Foxit as expected.
If anybuddy else has a similar issue, there's some useful ideas in this blog page.
https://www.technorms.com/26760/add-remove-programs-open-menu-registry
Meanwhile, I've marked this as [SOLVED]