How to change default mode to open to view, not browser

Ask for help and post your question on how to use XnView Classic.

Moderators: XnTriq, xnview

PeaceByJesus
Posts: 11
Joined: Mon Jan 27, 2014 5:35 pm

Re: How to change default mode to open to view, not browser

Post by PeaceByJesus » Tue Jan 28, 2014 7:53 pm

I looked under the Reg. key listed above (HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts), and while i saw no Special permissions, i did notice a difference btwn jpg and jpeg, as seen in this image:

Image

I do not know the significance of this, or how to change it, but perhaps it will mean something to someone here relative to the issue.

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

Re: How to change default mode to open to view, not browser

Post by XnTriq » Wed Jan 29, 2014 5:00 am

PeaceByJesus wrote:I do not know the significance of this, or how to change it, but perhaps it will mean something to someone here relative to the issue.
Could you please export the .jpg & .jpeg branches and post the contents of the resulting .reg files?

PeaceByJesus
Posts: 11
Joined: Mon Jan 27, 2014 5:35 pm

Re: How to change default mode to open to view, not browser

Post by PeaceByJesus » Wed Jan 29, 2014 9:13 pm

OK, here is one, and here is the other one, as text files to make it easier.

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

Re: How to change default mode to open to view, not browser

Post by XnTriq » Wed Jan 29, 2014 11:00 pm

PeaceByJesus wrote:OK, here is one, and here is the other one, as text files to make it easier.
Thank you.
[color=green]jpg.txt[/color] wrote:

Code: Select all

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.jpg]

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.jpg\OpenWithList]
"a"="PhotoViewer.dll"
"b"="dcba"
"c"="DllHost.exe"
"d"="firefox.exe"
"MRUList"="edabc"
"e"="xnview.exe"

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.jpg\OpenWithProgids]
"jpegfile"=hex(0):
"XnView.jpg"=hex(0):

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.jpg\UserChoice]
"Hash"="XXXXXXXXXX="
"ProgId"="XnView.jpg"
[color=green]jpeg.txt[/color] wrote:

Code: Select all

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.jpeg]

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.jpeg\OpenWithList]
"a"="firefox.exe"
"MRUList"="cedab"
"b"="a"
"c"="xnview.exe"
"d"="DllHost.exe"
"e"="PhotoViewer.dll"

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.jpeg\OpenWithProgids]
"jpegfile"=hex(0):

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.jpeg\UserChoice]
"Hash"="XXXXXXXXXXX="
"ProgId"="Applications\\xnview.exe"
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

PeaceByJesus
Posts: 11
Joined: Mon Jan 27, 2014 5:35 pm

Re: How to change default mode to open to view, not browser

Post by PeaceByJesus » Thu Jan 30, 2014 1:24 am

Thanks for going to all that diagnostic work. Yet I do not think this is needed since i found I can just as well save the pics as jpg and change the ext. on the ones i have if i want to directly open them. But maybe this raised an issue that will help others.

This W/8 difference must be why a MS tech spent about 4+ hours (his dime) total trying to get Windows Media Center (not player, since MS saves itself money by not providing the licensing, so you must buy the Media Center to be legal it seems) to play DVDs directly. I finally went to eightforums.com and someone found a way, which the MS tech improved.

Post Reply