We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

philb1208
Posts: 44
Joined: Thu Jul 04, 2019 3:24 pm

Failed updates completely uninstall my application

Hello, long time no post! (we have a license now :D )

I had a strange issue last week in which an auto update completely removed my application/windows service. I Think it was failing due to some registry entries - i have some persistent entries which had default values "Select One". so...

When in install the application i pick some values from a drop down menu, these are the values written to the registry. When the update runs it uses these values to answer the dialog during the update (so we don't need used input) I noticed after my last update, these values had been defaulted to "Select One" and realised I'd got the persistent properties set wrong. I updated these and tested in my dev environment and all went great.

Now, in (my lack of) hindsight i should have tested further, as it seems that any servers that had previously updated and had the new "select one" values were failing to update, even worse the application was being ripped out completely :cry:

I can't have this happening - luckily only a few dozen machines were affected. How can i stop this from happening? That is,

i install version 1.0 - works perfect
i package an update 1.1 with an unknown bug
my servers download this version
the installation fails
The original version/files that were installed are kept there, no files are removed
I fix the update and repackage it
at the next check in interval the newer version is download and installs (because the update file has changed on my update server, is that right?)

How can we do this? And please explain gently. I don't have a developer brain!

Also, great product!
Catalin
Posts: 7853
Joined: Wed Jun 13, 2018 7:49 am

Re: Failed updates completely uninstall my application

Hello Phil,

I am glad you guys have purchased a license. I hope it already helped you guys ease the packaging process.

The fact that your application was first uninstalled is due to the "Uninstall old version first and then install new version" option. Basically, this is how an upgrade works, it first uninstalls the older version and the installs the newer one.

In your scenario, I think that you could solve your problem (if the problem is indeed cause by the registry entries) through a patch (also known as minor upgrade).Patches are usually much smaller than upgrades, as they only contain the diffs between the two versions of the product. However, they can only be installed on computers that have the previous version already installed.

More information about patches can be found in the following articles:

Creating Patches

and

Authoring a Windows Installer Patch

Let's consider you have version 1.0.1 being the faulty one, already delivered to your clients. Copy (if you do not already have copies of previous versions) it to a separate folder. Now please open the project (.AIP file) and apply your fix there. Now, you need to increase the product version (from the "Product Details" page) and, when asked about generating a new Product Code, select "Keep existing".

Now, we have two MSIs which we will use to create our patch (which, as mentioned above, consists only in the diffs between the two MSIs, basically our quick fix). Here, I think that no further explanation is need as it is already explained in the above linked articles.

Now, in order to test it, you could install the Patch on the machine and then try again to perform a major upgrade. As the fix was applied, the major upgrade should now succeed - hopefully :D

Hope this helps.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”