-
-
Notifications
You must be signed in to change notification settings - Fork 715
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
Registry patch #1781
base: master
Are you sure you want to change the base?
Registry patch #1781
Conversation
This seems fine; I'll try to test it in a few days. Since I don't know much about the registry - what's the difference between HKCU / HKCR / HKLM? |
Correct me if I'm wrong, but I believe:
|
You are right. I don't really know why it didn't work with HKCU though, I just noticed all the other browsers having their keys in HKLM. |
Fixed the keys not being deleted on uninstall. Corrected a typo. Added a function to delete the values that are not being deleted with the keys.
Apparently, the original problem has nothing to do with HKCU/HKLM. For some reason the installer creates empty values under HKCU/SOFTWARE/Classes/Min in its subkeys. Specifically, an empty value in ../Min/shell/open/command causes the problem. At least setting it manually fixed the issue on Windows 10. Not sure if that's the case for Windows 7 though, as I remember setting the value manually with no result. I'll test it once again, please don't merge for now. |
Hopefully fixed some keys not being created on install, minor changes.
Seems like Windows 7 requires the key to be under HKLM:
Regarding the empty values issue: some values in the array were named without single quotes, which could've caused the problem. Everything should be fine now. |
This isn't working for me so far (Windows 10 20H2). It looks like the Will try debugging in a bit, but let me know if you have any ideas. |
That is weird, I've tried running the script from node command line and it was working fine. Is the value under RegisteredApplications being created? Does the Min key under HKCR have all its subkeys and values? Is the Min value under HKCR/.pdf/OpenWithProgIds there? If so, you may need to manually set Min as the default for .pdf in Default apps > Set defaults by app. You can send me the build so I could test it on Windows 7 too. |
I tried running the script directly from the node CLI (good idea!), and if I modify it to print out errors from the regedit functions, I get this: Although when you were running it with Node, were you able to make it run successfully without administrator access? |
Ah, that makes sense. Sorry, writing to HKCR / HKLM does require administrator privileges, which I forgot to mention. There seems to be an easier solution though. |
I haven't tried it, but that looks like it would make Min run as administrator all the time, rather than just during the installation (which is what we want). |
Oh, actually yes, but isn't it also the case for the solution you mentioned? Apparently, there's no option to require a Squirrel installer to run with admin rights. |
The installer isn't running the script - it's launching an instance of Min, which then checks for a flag and runs the registry config if it's present: https://github.com/minbrowser/min/blob/master/main/main.js#L40-L42. So even if the installer ran as admin it wouldn't help. |
That makes sense. |
I think 588a0cf is close to the right way to do it. If I run it directly with |
Oh, I wish I could. I'm not familiar with JS/Electron, so I see nothing wrong there. At least you can send me the build to see if I can reproduce. |
I finally came back to this PR; I think the hang I was seeing before was actually a graphics issue with my VM. If I change the shortcut to Min to run with I can set Min as the default handler for PDF files now, but if I try to open one, I get stuck in this loop: Screen.Recording.2022-01-15.at.5.53.33.PM.mov |
I was not able to reproduce this bug, it might have something to do with your VM. Could you please send me the installer, so I could try to reproduce it that way? I've only tried to run registryConfig.js in node CLI. |
Fixed Min not showing in the Default Programs list, added support for .pdf file extension.