Association problem .jpeg

Ideas for improvements and requests for new features in XnView Classic

Moderators: XnTriq, xnview

Post Reply
user0
Posts: 4
Joined: Sat May 09, 2015 9:37 am

Association problem .jpeg

Post by user0 » Sat May 09, 2015 11:08 am

For some reason it is not possible to set to .jpeg to be opened by XnView by default in win 8. Instead it just runs XnView, but not opening file itself with Xnview (see #1 at pic below).

I guess solution can be found via adding .jpeg to default association list for XnView (see #2 at pic below)

Image

user0
Posts: 4
Joined: Sat May 09, 2015 9:37 am

Re: Association problem .jpeg

Post by user0 » Sat Jul 25, 2015 4:50 pm

any thoughts? Is it possible to realize?

uRsti11anError
Posts: 21
Joined: Thu Aug 06, 2015 5:39 pm

Re: Association problem .jpeg

Post by uRsti11anError » Thu Aug 06, 2015 5:59 pm

a) .jpeg is present in XnView's list of supported extensions. Switch to "View as Extension" mode in your file association options window to find it easier way.
b) in Windows 8 it may be more complicated. See why:

Code: Select all

http://forum.xda-developers.com/showthread.php?p=29456442#post29456442
*wrapped link into code tags in case links to other sites are not welcome

User avatar
XnTriq
Moderator & Librarian
Posts: 5434
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Association problem .jpeg

Post by XnTriq » Thu Aug 06, 2015 8:15 pm

uRsti11anError wrote:wrapped link into code tags in case links to other sites are not welcome
You're welcome to post links, uRsti11anError. Exceptions to the rule are warez sites etc.

Forum references:
XnTriq ([url=http://newsgroup.xnview.com/viewtopic.php?t=29328&p=117006#p117006]How to change default mode to open to view, not browser[/url]) wrote:Fixing this would've been a piece of cake with older versions of Windows. Unfortunately I can't give you an easy answer, because I don't have access to a Windows 8 PC and don't want to screw up your registry.
TechNet Blogs (Behind Windows Setup & Deployment: [url=http://blogs.technet.com/b/mrmlcgn/archive/2013/02/26/windows-8-associate-a-file-type-or-protocol-with-a-specific-app-using-a-gpo-e-g-default-mail-client-for-mailto-protocol.aspx]Windows 8: Associate a file Type or protocol with a specific app using GPO[/url]) wrote:In Pre-Win 8, apps could set the default handler for a file type/protocol by manipulating the registry, this means you could easily have a script or a group policy manipulating the registry.
For example for Mailto protocol you just needed to change the “default” value under HKEY_CLASSES_ROOT\mailto\shell\open\command

Image

However In Win 8, the registry changes are verified by a hash (unique per user and app) that detects tampering by apps. In the absence of a valid hash, we ignore the default in the registry.
HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\Associations\URLAssociations\MAILTO\UserChoice

Image
Razwer Blog ([url=http://blog.razwer.com/user-based-file-type-associations-in-windows-20128-2012r28/]User based file type associations in Windows 2012/8 2012R2/8.1[/url]) wrote:It seems that file type associations have changed a bit since the introduction of server 2012 / Windows 8. Older tools seem not to work and the documentation on the newer method seems to lack at the moment of this writing.

Case: i have two applications installed of which i want to decide per user which app is being used for the specific filetype. So for example i have a .doc file and i want user A to use MS Word and user B to use Word Viewer for this filetype. I am not discussing the prevention of use of any of these apps, only the filetype association on a user level!

Filetype associations are stored in the following registry key for the user: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.doc\UserChoice

This entry does not exist if the user has never opened the file before. However when this entry is written by OpenWith.exe (the default dialog box which is presented) the permissions on the keys are messed up.

This UserChoice key is the important factor here. It includes two entries, a hash for the file, and ProgId

This ProgId is the one you want to change. Seems simple enough right? WRONG! by default you have no permission to edit this string value. So what to do? Deleting the string value also generates an error for having no permissions.

The fix is to delete the UserChoice key! have a script, or GPO preference delete this key and recreate it with your setting of choice. Not adding the hash will however break the changes you make.

Note that once you have re-created the UserChoice key yourself, you are no longer limited to the permission issues on that key and can edit it by script without having to delete it.

Keep in mind your application should be known in HKEY_CLASSES_ROOT\Applications

This is a merged view of HKEY_CURRENT_USER\Software\Classes and HKEY_CURRENT_MACHINE\Software\Classes and thus should you make the proper entries (if you script in the user space) under HKEY_CURRENT_USER\Software\Classes
XnTriq ([url=http://newsgroup.xnview.com/viewtopic.php?t=29216&p=117231#p117231]unable to remove/deselect file associations[/url]) wrote:
xnview wrote:If you add a hash key, you are able to unselect extension??
I don't have any hands-on experience with Windows 8, but it is my understanding that the hash key can only be added by the system, and that there's no way to associate file types during the installation of XnView or from within XnView's options (“System integration”) any more :|
MSDN (Windows Desktop Development » [url=http://msdn.microsoft.com/en-us/library/windows/desktop/hh848047.aspx]File type and URI associations model[/url]) wrote:The file type and URI association model has changed in Windows 8. Apps are no longer able to programmatically set themselves as the default handler for a file type or URI. Instead, now the user always controls what the default handler is for a file type or URI scheme.
Microsoft ([url=http://download.microsoft.com/download/4/3/A/43A474F2-5038-47BD-A4D3-ECD5EFE80192/Best%20practices%20for%20file%20type%20and%20protocol%20associations%20in%20Windows%208%20desktop%20apps.docx]Best Practices for File Type and URI Associations in Windows Developer Preview Desktop Apps[/url]) wrote:There are three ways your application can be surfaced once it registers. Choose the option that is most appropriate for your application.
  1. Default contention
    • Description: Applications that contend for defaults will be proactively promoted to the user automatically by Windows.
    • Recommended for: Apps that wish to be the considered for selection as the default handler for a file type.
    • How to do this: Register your ProgID under
      • \SOFTWARE\Classes\[FileType]\OpenWithProgIDs
  2. ‘OpenWith’ list
    • Description: Applications that are added to the OpenWith list (but don’t contend to be a default handler) appear on the OpenWith list, but are not proactively promoted to the user.
    • Recommended for: Apps that are used as occasional viewers or editors of a file type, but not necessarily appropriate as the default.
    • How to do this: Register your ProgID under
      • \SOFTWARE\Classes\[FileType]\OpenWithList
  3. ‘See all’ list
    • Description: Applications that register to be included in the ‘see all’ portion of the OpenWith list are available to be chosen for any file type.
    • Recommended for: Generally not recommended, except for apps that are universal viewers for all file types.
    • How to do this: Register your application under \SOFTWARE\Classes\Applications, and be sure to not add a ‘NoOpenWith’ key.

Post Reply