Windows 11 keeps asking "Select an app to open this .JPG file"

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Horst
Posts: 1227
Joined: 24 Jan 2021 12:27
Location: Germany

Re: Windows 11 keeps asking "Select an app to open this .JPG file"

Post by Horst »

elqasar2 wrote: 26 Feb 2024 15:24
elqasar2 wrote: 20 Aug 2023 20:39What happens now if I double-click an image file in XYplorer, it that it now opens in the Photos app without any further prompt, but in the Photos app it is not possible to use the mousewheel or arrow keys to move on to the next/previous image. Only the file that was double-clicked can be viewed. When doing the same from File Explorer, you can navigate to next/previous images in the same folder.
The reason is that the Photo app only works with the Explorer.
All 3rd party file managers have the same problem.
In Total Commander one can select to use the old Photo viewer which doesn't have this problem.
But for all file mangers, the best solution is to use one of the available Image tools.
None of them has such problems with any file manager and contain all functions normal users need.
Windows 11 Home, Version 24H2 (OS Build 26100.4061)
Portable XYplorer (Actual version, including betas)
Everything 1.5.0.1393a (x64), Everything Toolbar 1.5.3.0, Listary Pro 6.3.2.88

Creat
Posts: 234
Joined: 22 Sep 2005 18:27

Re: Windows 11 keeps asking "Select an app to open this .JPG file"

Post by Creat »

I also just ran into this problem. XYplorer just won't open the assigned windows default silently.

It happens to also apply to JPG files, but not exclusively. I've also had it happen with non-image files, just not very recently. I don't want to use CFA cause setting one default should be enough, and I also do change this somewhat frequently and I don't wannna babysit XYplorer for it to follow the system default. I'm not using a store app, btw. It's not the "evil" (?) Microsoft Photos App either. Currently it happens to be JPEGview (sylikc fork), if anyone cares, but this was a problem before using that particular program.
Another reason is that it's not about 1 extension (jpg) or 2 (jpeg), but like 30+, and frankly neither do I want to go through the list, nor do I like having to remeber that for any change to extension type "image" i have to change something in XYplorer.

Every time I double click on any image file, I get asked what program I want to open it with, and the "always use" checkbox doesn't do anything. Explorer doesn't ask. TotalCommander doesn't ask. it's exclusively an XYplorer problem.

What I didn't see in this thread, despite all the discussion and elqasar2's attempt to get actual help with the problem, there doesn't seeem to be any actual solutions (to be clear: CFA is a workaround, not a solution). So, is there an actual solution out there?

Edit: forgot to mention that this is actually on Windows 10 (not 11), which may or not make a difference.

admin
Site Admin
Posts: 63470
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Windows 11 keeps asking "Select an app to open this .JPG file"

Post by admin »

What is shown for "Opens with" in the JPG tooltip?
Attachments
TooltipOpenWith.png
TooltipOpenWith.png (11.76 KiB) Viewed 1658 times

Creat
Posts: 234
Joined: 22 Sep 2005 18:27

Re: Windows 11 keeps asking "Select an app to open this .JPG file"

Post by Creat »

It actually doesn't say. But that isn't limited to JPEG files, the tooltip is much shorter than your example. Also no other file type tooltip has that information, including those that open fine without any "open with"-prompt (like PDF).
Since I've used XYplorer for a long time, I might have a legacy setting somewhere I'm not awayre of? Like something where the default has long since changed? I did check the settings for "tooltip" and not a lot came up, and everything there seemed reasonable.

Tooltip screenshot is of course attached for reference.

EDIT: Found the setting under Information / File Info Tips, ticked extra fields where it lists the open with field in the selection. It now shows it, and it correctly shows the program it should be opened with as "JPEGview". Added a 2nd screenshot of course.
Attachments
2nd Screenshot, now including the "open with" field.
2nd Screenshot, now including the "open with" field.
TooltipScreenshot2.png (4.9 KiB) Viewed 1655 times
Screenshot of a tooltip for a JPG file
Screenshot of a tooltip for a JPG file
TooltipScreenshot.png (3.63 KiB) Viewed 1656 times

admin
Site Admin
Posts: 63470
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Windows 11 keeps asking "Select an app to open this .JPG file"

Post by admin »

Is the field ticked here?
Attachments
2024-06-03_231359.png
2024-06-03_231359.png (47.7 KiB) Viewed 1652 times

Creat
Posts: 234
Joined: 22 Sep 2005 18:27

Re: Windows 11 keeps asking "Select an app to open this .JPG file"

Post by Creat »

It is now, I had just edited my post after I found that :D

admin
Site Admin
Posts: 63470
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Windows 11 keeps asking "Select an app to open this .JPG file"

Post by admin »

Select a JPG file and run this through the address bar:

Code: Select all

echo get("assoc", <curitem>);

Creat
Posts: 234
Joined: 22 Sep 2005 18:27

Re: Windows 11 keeps asking "Select an app to open this .JPG file"

Post by Creat »

Result as it should be, I assume? see screenshot

While making the screenshots, I've noticed something rather weird: the association works just fine with PNG files currently. I've opened one of the PNG screenshots, and that directly opened the viewer (no "open with" prompt). Your command also yields the same result for PNG and JPG files. So I'm just even more confused now...

Just to be clear: I can open both PNG and JPG just fine with a double-click in both explorer and totalcommander, neither give me an "open with" prompt. so: my confustion intensifies.

I did also restart XYplorer a bunch to make sure that wasn't the propblem either. And updated to the latest version just to be very sure that wasn't it, but I wasn't that far behind the latest version anyway, and I assume the code that handles this doesn't exactly change daily...

As mentioned before: I vaguely remember I did have this issue before where I didn't investigate it further, also on a different PC (at work). I can't remember what the file type was, or the exact situation, but I think it was something that was associated with notepad++ back then (not txt, but ini or xml or something). I was midly inconvenienced, but had work to do so no time to dig deeper and I just moved on.
Edit: It's one of these issues that pops up occasionally, but just hasn't been annoying enough to make a post about (until today). It also might go away on it's own, either due to the cause going away too or maybe it's just intermittent?
Attachments
TooltipScreenshot3.png
TooltipScreenshot3.png (4.73 KiB) Viewed 1640 times

admin
Site Admin
Posts: 63470
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Windows 11 keeps asking "Select an app to open this .JPG file"

Post by admin »

AFAIK, this is a known problem of Windows 10/11 (how can such a basic thing be an OS-level problem, it's bizarre). There are even videos on YouTube about it, e.g.: https://www.youtube.com/watch?v=cUvrngouMe0

Anyway, I'll try to fix it by explicitly doing what the OS is supposed to do: Find the associated application and use it.

PS: What happens when you right-click the file and open it via Open in the context menu?

Creat
Posts: 234
Joined: 22 Sep 2005 18:27

Re: Windows 11 keeps asking "Select an app to open this .JPG file"

Post by Creat »

Well I can maybe narrow it down a bit more. It seems to be tied to the environment of XYplorer somehow, so it must be something tied to that.

When I start a command prompt from XYplorer in the folder where I want to open an image (Ctrl-Alt-P), and execute "start <imgname>.jpg" I get the prompt. If I check the "always use" box and try again, still same prompt. So same as XYplorer. The command shell obviously inherits XYplorers environment.
If I open the command prompt from the start menu, and navigate to the same folder, and run the same "start" command, the file opens immediately without prompt.

The only difference being the environment, as far as I can tell the only differences are from XYplorer being 32bit.
This is a complete list of the differences (explorer/native on left, xyplorer on the right). Quotes added by me do be able to differentiate the limits of the values more easily:
CommonProgramFiles="C:\Program Files\Common Files" vs "C:\Program Files (x86)\Common Files"
PROCESSOR_ARCHITECTURE="AMD64" vs "x86"
PROCESSOR_ARCHITEW6432=AMD64 (ONLY present on XYplorer)
ProgramFiles="C:\Program Files" vs "C:\Program Files (x86)"

Edit: forgot to answer your question. If I open with the (default) menu entry "Open with JPEGView" in the context menu, I get the prompt. If I open it via the "edit with JPEGView" there is NO prompt. Also no prompt for "Open with UVtools". I've added a registry export of my HKEY_CLASSES_ROOT\.jpeg as well in a zip. I'm still trying to find the actual entries though, with all the CLSIDs it's a bit of a maze these days...

Edit2: Renaming a file to .jpeg also works and opens it directly. The context menu entry is also just called "Open" in that case, for some reason.
Attachments
classes-root-.jpg.reg.zip
(559 Bytes) Downloaded 70 times
MenuScreenshot.png
MenuScreenshot.png (14.8 KiB) Viewed 1590 times

highend
Posts: 14163
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Windows 11 keeps asking "Select an app to open this .JPG file"

Post by highend »

The command shell obviously inherits XYplorers environment
That's standard Windows behaviour

What happens if you run the command prompt from XY, execute:
set PROGRAMFILES=%ProgramW6432%
and then your
start <imgname>.jpg
?
One of my scripts helped you out? Please donate via Paypal

admin
Site Admin
Posts: 63470
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Windows 11 keeps asking "Select an app to open this .JPG file"

Post by admin »

Is it not fixed in v26.00.0307???

Creat
Posts: 234
Joined: 22 Sep 2005 18:27

Re: Windows 11 keeps asking "Select an app to open this .JPG file"

Post by Creat »

For comparison, here's also the HKEY_CLASSES_ROOT\.jpeg as a zip. It has a different content type (image/jpg vs application/jpg), no clue if that's normal.
Only .jpg points to "JPEGView.Document". JPEG is identical otherwise, but just missing that entry. That entry has the weirdest content as shell\open\command\command for I've ever seen, with an obfuscated (?) path? or something? In RegEdit it reads as (but it exports as hex): `Y*wY'Ant@Ml7-CnO`G7JPEGViewMain>qO^a3KXH4?}6-a7cCt!O "%1"
The plain entry in shell\open\command\(Default) is identical to another type called "JPEGViewImageFile" though, and just points to "C:\Program Files\JPEGView\JPEGView.exe" "%1" as per normal and expected.
I've added both entries as exports in JPEGview.zip.

This difference of course also shows up in the new windows settings "Choose default applications by file type", where only jpg is a "JPEGView associated file type", all others are "EXTENSION File", so for example "GIF File" or "JPEG File".

With this information I can probably get this to stop breaking from XYplorer rather easily, but I still have no clue WHY it breaks, and how to detect or avoid it in the future, as I'd like to have this "just work" and not occasionally just break for random extensions cause Windows/Microsoft is being weird (I guess?).
Attachments
JPEGview.zip
(1.02 KiB) Downloaded 47 times
classes-root-.jpeg.reg.zip
(515 Bytes) Downloaded 71 times

Creat
Posts: 234
Joined: 22 Sep 2005 18:27

Re: Windows 11 keeps asking "Select an app to open this .JPG file"

Post by Creat »

highend wrote: 04 Jun 2024 18:25
The command shell obviously inherits XYplorers environment
That's standard Windows behaviour
Yea that's why I said "obviously" ;)
highend wrote: 04 Jun 2024 18:25 What happens if you run the command prompt from XY, execute:
set PROGRAMFILES=%ProgramW6432%
and then your
start <imgname>.jpg
?
Still get the prompt. Setting the other environment variables to be like a direct start from the start menu also has no effect, weirdly enough.

Note that running "cmd" from xyplorer (or using Ctrl-Alt-P) runs a 32 bit version of cmd.exe located in C:\Windows\SysWOW64\cmd.exe, despite the command line being C:\Windows\system32\cmd.exe due to the 32-bit/64-bit translation layer. Of course windows starts a 64-bit image of cmd.exe that's actually located at C:\Windows\system32\cmd.exe.

Creat
Posts: 234
Joined: 22 Sep 2005 18:27

Re: Windows 11 keeps asking "Select an app to open this .JPG file"

Post by Creat »

admin wrote: 04 Jun 2024 18:36 Is it not fixed in v26.00.0307???
Unfortunately, no. Problem remains unchanged for me on 307. Sorry.

Edit/Addendum: The environment for both JPEGView.exe launched from XYplorer and Explorer respectively is identical in the parts that differ for cmd. It doesn't inherit the 32-bit based envs cause it isn't a 32 bit process (but cmd is). But there are some (other) differences, which I don't think make a difference but here they are anyway. The one launched from XYplorer having these that are missing when launched from Explorer:
FPS_BROWSER_APP_PROFILE_STRING=Internet Explorer
FPS_BROWSER_USER_PROFILE_STRING=Default
SESSIONNAME=Console

Post Reply