Hugo_Jimenzz
Posts: 2
Joined: Tue Oct 08, 2024 8:33 am

Upgrading a Silent Install

Good morning everyone :D , I have been using the app very little and I have a problem.

I have an msi that is launched as a silent installation, the question is that since I couldn't think of how to update it silently, I added the custom action when launching the msi installation of "UninstallPreviousVersions".

The problem is that there are certain files that they must not be modified/deleted since they are user configuration files.

Is there a way to protect those files? Or also, is there a more optimal way to update?

Thank you very much! :D :D
Catalin
Posts: 7492
Joined: Wed Jun 13, 2018 7:49 am

Re: Upgrading a Silent Install

Hello Hugo and welcome to our forums,

Please note that the update is done automatically, you do not have to do any custom modifications to your setup package.

All you have to do is:

1. increase the version

2. change the ProductCode

This way, when you will install the newer version, it will automatically remove the older version and then install the newer version.

Now, regarding the removal of files, please refer to this article which explains how to achieve what you need:

How do I prevent a file or registry entry from being uninstalled or repaired?

Hope this helps!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Hugo_Jimenzz
Posts: 2
Joined: Tue Oct 08, 2024 8:33 am

Re: Upgrading a Silent Install

Catalin wrote: Wed Oct 09, 2024 1:24 pm Hello Hugo and welcome to our forums,

Please note that the update is done automatically, you do not have to do any custom modifications to your setup package.

All you have to do is:

1. increase the version

2. change the ProductCode

This way, when you will install the newer version, it will automatically remove the older version and then install the newer version.

Now, regarding the removal of files, please refer to this article which explains how to achieve what you need:

How do I prevent a file or registry entry from being uninstalled or repaired?

Hope this helps!

Best regards,
Catalin
Thank you very much for your response,

I am reading the article that you have provided me. I have also found in the file properties in the "operations" section there is the overwriting behavior which I can check the option "do not overwrite existing file".

Would that also solve my problem? And if so, do I leave the default value 1 in the condition text box?
Catalin
Posts: 7492
Joined: Wed Jun 13, 2018 7:49 am

Re: Upgrading a Silent Install

Hello Hugo,

You are always welcome!
have also found in the file properties in the "operations" section there is the overwriting behavior which I can check the option "do not overwrite existing file".

Would that also solve my problem? And if so, do I leave the default value 1 in the condition text box?
That would indeed solve the problem. :)

Now, regarding the condition used, I am assuming you do not wante the files removed during an upgrade, correct?

If that is the case, then the condition should be OLDPRODUCTS.

Now, when version 2 of your product is installed on top of version 1, when version 1 is removed, those files will not be removed.

Hope this helps!

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

Return to “Common Problems”