Comment 0 for bug 1733692

Revision history for this message
Jason Boyer (jboyer) wrote :

Hatch 0.0.3 and 0.1.2

The NSIS script for Hatch is making some poor assumptions that can cause Hatch to fail in very common scenarios.

Forces 64 bit registry access on 64bit Windows: This means that only the 64 bit version of Java will be detected. To this day the version pushed on Windows users on the Java.com homepage is 32 bit. It should be able to detect either. I suspect more special handling of the registry will also be required if we un-comment the Chrome Extension installer keys [[http://git.evergreen-ils.org/?p=Hatch.git;a=blob;f=installer/windows/hatch.nsi;h=3b676f0f18fc0e4cc0a071ba65565230d3533a41;hb=HEAD#l152|here]].

Uses local user registry keys: This will appear to work when you do the install as an admin account that only needs to click Yes to a UAC prompt to perform the installation but if you install Hatch as an administrator no other account will be able to find the NativeMessagingHosts key because it only exists in a single admin account. Installers should only ever write to system-wide registry keys unless it's a user local installation which there's no point in supporting for this. (If we still required any HKEY_CURRENT_USER registry entries even with a system wide install we'd have to check / write them at startup, not install time) The [[https://developer.chrome.com/apps/nativeMessaging#native-messaging-host-location|system-wide key]] that Chrome checks for NativeMessagingHosts is HKEY_LOCAL_MACHINE\SOFTWARE\Google\Chrome\NativeMessagingHosts\(rev.dns.name.here) @="path\to\native\host\hatch.bat"

We should be pulling the existing Hatch installation location from the registry also rather than always assuming it's going to be %PROGRAMFILES%\Hatch, if for no other reason than we may end up running an out of date uninstaller that misses files or worse, we try to run an uninstaller that doesn't exist. (related: we should allow the user the option of installing wherever they like)

I've got a spare machine handy that I'm going to try to make some progress on soon with this.