ahmed.gad_it
Posts: 21
Joined: Fri Jun 08, 2018 12:07 pm

Force reinstalling

Wed Aug 01, 2018 2:53 am

Hi,

How to force reinstalling my software without having to uninstall?

Thanks!

Catalin
Posts: 6542
Joined: Wed Jun 13, 2018 7:49 am

Re: Force reinstalling

Wed Aug 01, 2018 10:06 am

Hello,

In order to achieve what you want, all you have to do is to trigger a repair command.

Here are two ways in which you can achieve that:

1) Go to Control Panel, click on your application and then click Repair. If the Repair button does not appear, you can click on the Change button and then select Repair from that dialog.

2) You can use a command line as it follows:

Code: Select all

msiexec.exe /fa {Product-Code}
where /f is the command used to repair a package and "a" means that it will force all files to be reinstalled. You can get the Product-Code of your product by opening your .aip (project file) --> Product Details page --> Product IDs tab.

Hope this helps!

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

ahmed.gad_it
Posts: 21
Joined: Fri Jun 08, 2018 12:07 pm

Re: Force reinstalling

Sun Aug 05, 2018 8:45 pm

Hi Catalin,

I do not mean to repair. The issue is that when i try to reinstall an application which is already installed, it pops up that the program is already installed and i must uninstall it first!

What i want is to reinstall the application smoothly and replacing the current installed files without having to repairing it from Control Panel!

Can i use the command:

Code: Select all

msiexec.exe /fa {Product-Code}
in installation command of the Build tab.

Thanks!

Catalin
Posts: 6542
Joined: Wed Jun 13, 2018 7:49 am

Re: Force reinstalling

Mon Aug 06, 2018 8:26 am

Hello Ahmed,

Please keep in mind that this is the default Windows Installer behavior. It checks if the ProductCode of the package is already installed, and if this is the case it will not allow another installation of the same ProductCode and a maintenance mode will be triggered.

The ProductCode property is a unique GUID used to identify your application. This identifier varies from version to version or between different languages of the same installer. You can check this directly from Advanced Installer by going to Product Details page -> Project IDs tab.

With that in mind, two products with the same ProductCode can not be installed on the same computer. Windows Installer will prevent this with an error.

This behavior mainly occurs on developer's machines, when a product has been installed, then modified from the .aip (project file), rebuilt and then you try to install it again via the .MSI file.

This can be avoided using two methods. One of them, and the easiest, is to run your setup directly from the .aip file. Advanced Installer will automatically uninstall the already existing product and will install it again.

The other method is to increase the "Version" from the "Product Details" page and create an upgrade. An upgrade means the uninstallation of the older product and the installation of the newer product. Upon trying to change the version, you will be asked if you want to change the ProductCode (in case of major upgrades), or if you want to keep the same (in case of patches). In this case, you will need to generate a new ProductCode.

Now, upon trying to run the setup via the .MSI file, the older version will be automatically uninstalled and the newer version will be installed.

Let me know if this helps!

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

Return to “Common Problems”