Issues / questions when transitioning from MSI-based installer to Squirrel.Windows
Hi,
We are in the process of (trying to) transition an existing product with a large installed user base from using an MSI-based installer (Advanced Installer) to Squirrel.Windows. We are using Delphi for Win32 as the development tool and thus do not use the nice .NET helpers etc. We have the basics working now, autoupgrading by just restarting the app etc.
However there are some issues and question that we still have to address:
A. Uninstall old MSI-install. How do we ensure the existing MSI-installed version at user PCs is uninstalled? Ideally this should be as smooth and integrated as possible, albeit with the unavoidable (?) UAC prompt to trigger an MSI-uninstall. Have anyone done this? Does Squirrel support this in any way? Or do we need to roll our own? Looking at this, it is slightly complex to find and trigger the correct uninstall: http://forum.sysinternals.com/finding-all-installed-programs-from-the-registry_topic21312.html.
This detect/uninstall logic really only needs to run once - when the Squirrel Setup.exe is run for the first time. Should I use the /firstrun command line to trigger this? Or is there some other way of modifying what Setup.exe does?
B. From my testing, Update.exe does not seem to support or respond to checkForUpdate command line option (?).
C. How can I know / detect when Update.exe is done - and get information about progress / status / version available etc? I read something about redirecting its output, but it does not seem to have any output - it just runs silently (and --update, --createShortcut and --removeShortcut do seem to work fine, I'm just running "blind").
D. We have a restart command in the application - and it should "do-the-right-thing" and run via update.exe and in the newest install folder (if it has been auto-upgraded in the background). Any update.exe support for this - or do I have to scan for the folder with the highest version number?
We have fixed A and D by rolling our own solution now. Seems to work fine :).
Will investigate more the issues with B and C and come back to you.
tbh, some of these problems are easier to solve by just parsing RELEASES yourself, it is a very very simple file format, and it'd be easier than trying to parse Update.exe's output
Hi Paul,
Thanks for the feedback!
Yes checking the RELEASES file directly is probably the easiest way of checking what the latest available version is.
Is there any way of knowing that the installer is done copying files and running the SquirrelAware application with the --squirrel- command-lines?
I guess I can wait until the old version is called with --squirrel--obsolete? And then IPC that back to the running instance?
/H
Is there any way of knowing that the installer is done copying files and running the SquirrelAware application with the --squirrel- command-lines?
Just run:
Update.exe --update https://path/to/your/update
And wait for that process to exit
Thanks! Obvious :)
@hvassbotn What do you mean by "rolling our own solution" in regards to "A. Uninstall old MSI-install."? Did you modify Squirrel source code to allow for UAC? I also have a need to run old uninstaller that is in the Program Files directory and requires administrative privileges.
@cztomczak No, no Squirrel changes.
In our application, when doing the initial new install, we detect if an older version of the product is installed, that was installed with an old-style admin-required ProgramFiles MSI installer.
If we detect that that is the case, we automatically try to uninstall the old version. This is to avoid two similar icons on the desktop. If the user does not have admin rights, he will not be able to uninstall the old version.