Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for "Default Programs" panel #129

Closed
MoshiMoshi0 opened this issue Sep 23, 2016 · 12 comments
Closed

Add support for "Default Programs" panel #129

MoshiMoshi0 opened this issue Sep 23, 2016 · 12 comments
Labels
Milestone

Comments

@MoshiMoshi0
Copy link

MoshiMoshi0 commented Sep 23, 2016

Currently the only way (on windows 10 at least) to set ImageGlass as default image viewer is to manually change each associations for supported file extensions.
The ideal way is to add ImageGlass to "Default Programs" panel, this provides users with easy management of associations.

Here is a microsoft guide about "Default Programs".

Basically the installer needs to write some registry keys.

@lovebdsobuj
Copy link

@devcompl,

Basically the installer needs to write some registry keys.

Yeah, I was try to write some registry for ImageGlass manually.
But I didn't get ImageGlass app in Default Programs list for associations Default Image viewer software.

Like these,

ImageGlass.reg

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\ImageGlass]
"ProgramFolder"="C:\\Program Files\\ImageGlass"
"ProgramPath"="C:\\Program Files\\ImageGlass\\ImageGlass.exe"

[HKEY_LOCAL_MACHINE\SOFTWARE\ImageGlass\Capabilities]
"ApplicationDescription"="A lightweight, versatile image viewer"
"ApplicationName"="ImageGlass"

ImageGlass Capabilities.reg

[HKEY_LOCAL_MACHINE\SOFTWARE\ImageGlass\Capabilities\FileAssociations]
".jpg"="ImageGlass.jpg"

ImageGlass.jpg.reg

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ImageGlass.png]
@="Image (png) File"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ImageGlass.png\DefaultIcon]
@="C:\\Program Files\\ImageGlass\\icons\\png.ico"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ImageGlass.png\Shell]

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ImageGlass.png\Shell\Open]
"FriendlyAppName"="ImageGlass"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ImageGlass.png\Shell\Open\Command]
@="\"C:\\Program Files\\ImageGlass\\ImageGlass.exe\" \"%1\""

@MoshiMoshi0
Copy link
Author

Is this going to be fixed in the next release?
Or maybe you could re-release the current version with fixed installer?

@d2phap
Copy link
Owner

d2phap commented Mar 7, 2017

Hi @devcompl , @lovebdsobuj
I'm working on this issue.

Can you try importing this and let me know if it works?

ImageGlass.Capabilities.reg

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\PhapSoftware]

[HKEY_LOCAL_MACHINE\SOFTWARE\PhapSoftware\ImageGlass]

[HKEY_LOCAL_MACHINE\SOFTWARE\PhapSoftware\ImageGlass\Capabilities]
"ApplicationName"="ImageGlass"
"ApplicationDescription"="A lightweight, versatile image viewer"
"ApplicationIcon"="\"C:\\Program Files\\ImageGlass\\ImageGlass.exe\",0"

[HKEY_LOCAL_MACHINE\SOFTWARE\PhapSoftware\ImageGlass\Capabilities\FileAssociations]
".svg"="ImageGlass.AssocFile.SVG"
".jpg"="ImageGlass.AssocFile.JPG"
".jpeg"="ImageGlass.AssocFile.JPEG"
".gif"="ImageGlass.AssocFile.GIF"
".webp"="ImageGlass.AssocFile.WEBP"
".bmp"="ImageGlass.AssocFile.BMP"
".ico"="ImageGlass.AssocFile.ICO"

ImageGlass.AssocFile.reg

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ImageGlass.AssocFile.SVG]
@="SVG file image"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ImageGlass.AssocFile.SVG\DefaultIcon]
@="\"C:\\Program Files\\ImageGlass\\ImageGlass.exe\",0"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ImageGlass.AssocFile.SVG\shell]

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ImageGlass.AssocFile.SVG\shell\open]
"FriendlyAppName"="ImageGlass"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ImageGlass.AssocFile.SVG\shell\open\command]
@="\"C:\\Program Files\\ImageGlass\\ImageGlass.exe\" \"%1\""





[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ImageGlass.AssocFile.PNG]
@="PNG file image"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ImageGlass.AssocFile.PNG\DefaultIcon]
@="\"C:\\Program Files\\ImageGlass\\ImageGlass.exe\",0"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ImageGlass.AssocFile.PNG\shell]

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ImageGlass.AssocFile.PNG\shell\open]
"FriendlyAppName"="ImageGlass"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ImageGlass.AssocFile.PNG\shell\open\command]
@="\"C:\\Program Files\\ImageGlass\\ImageGlass.exe\" \"%1\""





[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ImageGlass.AssocFile.JPG]
@="JPG file image"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ImageGlass.AssocFile.JPG\DefaultIcon]
@="\"C:\\Program Files\\ImageGlass\\ImageGlass.exe\",0"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ImageGlass.AssocFile.JPG\shell]

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ImageGlass.AssocFile.JPG\shell\open]
"FriendlyAppName"="ImageGlass"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ImageGlass.AssocFile.JPG\shell\open\command]
@="\"C:\\Program Files\\ImageGlass\\ImageGlass.exe\" \"%1\""




[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ImageGlass.AssocFile.GIF]
@="GIF file image"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ImageGlass.AssocFile.GIF\DefaultIcon]
@="\"C:\\Program Files\\ImageGlass\\ImageGlass.exe\",0"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ImageGlass.AssocFile.GIF\shell]

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ImageGlass.AssocFile.GIF\shell\open]
"FriendlyAppName"="ImageGlass"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ImageGlass.AssocFile.GIF\shell\open\command]
@="\"C:\\Program Files\\ImageGlass\\ImageGlass.exe\" \"%1\""




[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ImageGlass.AssocFile.WEBP]
@="WEBP file image"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ImageGlass.AssocFile.WEBP\DefaultIcon]
@="\"C:\\Program Files\\ImageGlass\\ImageGlass.exe\",0"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ImageGlass.AssocFile.WEBP\shell]

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ImageGlass.AssocFile.WEBP\shell\open]
"FriendlyAppName"="ImageGlass"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ImageGlass.AssocFile.WEBP\shell\open\command]
@="\"C:\\Program Files\\ImageGlass\\ImageGlass.exe\" \"%1\""



[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ImageGlass.AssocFile.BMP]
@="BMP file image"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ImageGlass.AssocFile.BMP\DefaultIcon]
@="\"C:\\Program Files\\ImageGlass\\ImageGlass.exe\",0"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ImageGlass.AssocFile.BMP\shell]

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ImageGlass.AssocFile.BMP\shell\open]
"FriendlyAppName"="ImageGlass"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ImageGlass.AssocFile.BMP\shell\open\command]
@="\"C:\\Program Files\\ImageGlass\\ImageGlass.exe\" \"%1\""



[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ImageGlass.AssocFile.ICO]
@="ICO file image"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ImageGlass.AssocFile.ICO\DefaultIcon]
@="\"C:\\Program Files\\ImageGlass\\ImageGlass.exe\",0"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ImageGlass.AssocFile.ICO\shell]

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ImageGlass.AssocFile.ICO\shell\open]
"FriendlyAppName"="ImageGlass"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ImageGlass.AssocFile.ICO\shell\open\command]
@="\"C:\\Program Files\\ImageGlass\\ImageGlass.exe\" \"%1\""




[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ImageGlass.AssocFile.JPEG]
@="JPEG file image"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ImageGlass.AssocFile.JPEG\DefaultIcon]
@="\"C:\\Program Files\\ImageGlass\\ImageGlass.exe\",0"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ImageGlass.AssocFile.JPEG\shell]

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ImageGlass.AssocFile.JPEG\shell\open]
"FriendlyAppName"="ImageGlass"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ImageGlass.AssocFile.JPEG\shell\open\command]
@="\"C:\\Program Files\\ImageGlass\\ImageGlass.exe\" \"%1\""

It's working in my machine.
image

@MoshiMoshi0
Copy link
Author

No, unfortunately it didn't work on my machine.
Maybe you have some leftover keys from previous installations or something like that.

@s8321414
Copy link

s8321414 commented Mar 8, 2017

@d2phap I think you can remove version number from "default program" panel.

@d2phap
Copy link
Owner

d2phap commented Mar 8, 2017

Hi, I missed this:

RegisteredApplications.reg

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\RegisteredApplications]
"ImageGlass"="Software\\PhapSoftware\\ImageGlass\\Capabilities"

@MoshiMoshi0
Copy link
Author

MoshiMoshi0 commented Mar 8, 2017

@d2phap
Seems to not work with windows 10 "Default apps".
But I could set ImageGlass as default from the old "Control Panel\All Control Panel Items\Default Programs\Set Default Programs".

After setting it the old way the "Photo viewer" in "Default apps" is empty.
applicationframehost_2017-03-08_14-12-05

@d2phap
Copy link
Owner

d2phap commented Mar 8, 2017

Hi,

Please delete all ImageGlass.AssocFile.* keys in HKEY_LOCAL_MACHINE\SOFTWARE\Classes\
Then run the below files again. I have installed new Windows OS to test it. It works as expected.

RegisteredApplications.reg

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\RegisteredApplications]
"ImageGlass"="Software\\PhapSoftware\\ImageGlass\\Capabilities"

ImageGlass.AssocFile.reg.reg

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ImageGlass.AssocFile]
@="ImageGlass file image"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ImageGlass.AssocFile\DefaultIcon]
@="\"C:\\Program Files\\ImageGlass\\ImageGlass.exe\",0"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ImageGlass.AssocFile\shell]

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ImageGlass.AssocFile\shell\open]
"FriendlyAppName"="ImageGlass"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ImageGlass.AssocFile\shell\open\command]
@="\"C:\\Program Files\\ImageGlass\\ImageGlass.exe\" \"%1\""

ImageGlass.Capabilities.reg

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\PhapSoftware]

[HKEY_LOCAL_MACHINE\SOFTWARE\PhapSoftware\ImageGlass]

[HKEY_LOCAL_MACHINE\SOFTWARE\PhapSoftware\ImageGlass\Capabilities]
"ApplicationName"="ImageGlass"
"ApplicationDescription"="A lightweight, versatile image viewer"
"ApplicationIcon"="\"C:\\Program Files\\ImageGlass\\ImageGlass.exe\",0"

[HKEY_LOCAL_MACHINE\SOFTWARE\PhapSoftware\ImageGlass\Capabilities\FileAssociations]
".svg"="ImageGlass.AssocFile"
".webp"="ImageGlass.AssocFile"
".bmp"="ImageGlass.AssocFile"
".dib"="ImageGlass.AssocFile"
".jpg"="ImageGlass.AssocFile"
".jpeg"="ImageGlass.AssocFile"
".jpe"="ImageGlass.AssocFile"
".jfif"="ImageGlass.AssocFile"
".gif"="ImageGlass.AssocFile"
".tif"="ImageGlass.AssocFile"
".tiff"="ImageGlass.AssocFile"
".png"="ImageGlass.AssocFile"
".ico"="ImageGlass.AssocFile"

@MoshiMoshi0
Copy link
Author

Yes now it works perfect.
Maybe one thing to tweak now would be to remove the version number from the name in "Default apps" like @s8321414 suggested.

Thanks!

@d2phap
Copy link
Owner

d2phap commented Mar 8, 2017

Thanks for your reply 👍

@d2phap d2phap added this to the 3.5.9.17 milestone Mar 8, 2017
@s8321414
Copy link

❤️

@d2phap
Copy link
Owner

d2phap commented Mar 17, 2017

The issue is fixed (same as #16).
This is a tesing version: http://www.imageglass.org/upload/moon/ImageGlass_3.x_17032017.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants