In early 2014, inspired by the Slack desktop application for OS X, LiveChat decided to create a new desktop application in a form of a smart client – a web application wrapped in a desktop application window.
The new application, based on new technologies, provided the opportunity to search for new solutions for application installation and update.
We decided to use C# and .Net Framework to create the new LiveChat Smart Client application, as it seemed like the most native development environment for Windows operating system.
Once the application was ready, ClickOnce technology appeared to be a suitable and convenient solution for its deployment:
it’s simple - Visual Studio publish wizard allows to create installation package with only few clicks;
it requires minimal user engagement - the user indeed only has to click once to finish the installation;
it offers built-in update mechanism;
it installs prerequisites if needed;
it launches the application after the installation is completed.
It is no secret that ClickOnce also has quite a few drawbacks:
It installs only for the current user and doesn’t allow installation in custom folder - the default installation folder is really hard to find, which complicates the task of running the application with additional parameters.
Customisation capabilities provided for installation process are very limited - ‘Create desktop shortcut’ is the only useful out of all available options. If you want to add the shortcut to the Startup folder, for example, you are on your own.
It cannot download files in the background, so the update process takes more time than it should.
Nevertheless, the ease of use and the built-in updater prevailed, and we decided to give it a try. Unfortunately, certain downsides of the chosen technology showed up after we deployed the application to the public.
One of the problems was that ClickOnce downloaded the application as a series of separate files, instead of a single compressed package. As a result, the progress window treated every file being downloaded at the moment as the last one, so the installer was unable to correctly approximate when the installation will be complete. The progress bar would approach 100%, and then it would go back and starts to fill up again, as the download of the next file began. It was confusing, but harmless.
ClickOnce installation progress window_
What was worse, sometimes the antivirus software would add a signature to binary files (even ones signed digitally) that were a part of the application. Modified files would fail the checksum verification, which resulted in the failure of the whole installation process.
Another major issue was the deinstallation process that didn’t check whether the application was running. As a result, it would appear that the application was successfully removed, because it was not listed in the ‘Programs and features’ list anymore. Meanwhile, it was still fully functional and tended to be launched during the operating system start-up. Fortunately Ivan Leonenko on CodeProject provided the solution for this problem (and one other mentioned before).
Finally, as ClickOnce did not support remote and silent installation, many corporate customers still required the MSI installer which had to be prepared separately.
It was clear that the LiveChat application needed an installation and update system that would be free from the disadvantages described above. Eventually we found one… but it is a topic for another post.
This is part two of a series of blog posts about installation and update systems for Windows that LiveChat desktop application utilised over the years. If you are interested in this topic, please read part one: The history of LiveChat application.