Reputation: 3295
I have one msi version 1.0.2
Now, i modified some files and created msi with same version 1.0.2
I tried to install updated version. It is giving error like " Unable to install because newer version of this product is already installed".
I have to release with latest version of 1.0.2 only.
Please let me know how to resolve this.
I already used this tips :
1.)Set DetectNewerInstalledVersion = true.
2.)Set RemovePreviousVersions = true.
3.)Change the product code.
But no result found.
Thanks in advance
Upvotes: 1
Views: 3181
Reputation: 21436
Automatic upgrades are performed only if you increase the version. If you modify the package and keep the same version, older packages with the same version cannot be removed automatically. It's a Windows Installer limitation.
Instead, you can manually uninstall the old package before installing the modified one.
Another solution would be to create a custom EXE bootstrapper which detects if the current version is installed and uninstalls it before launching the new package.
Upvotes: 2
Reputation: 6159
When you are working on a windows application and deploying your solution every now and then, you should be aware on not deleting all files on reinstall like the database file and some files generated by the user.
But when changing you application setup project version number you will notice that the EXE file will not be updated in most of the times, to ensure that the EXE file will be reinstalled you will have to add a property to the MSI file called REINSTALLMODE and give it a value “amus”, I know for now this will make no sense for you so I will explain a little bit more about this issue.
The REINSTALLMODE property is a property added to the MSI file by editing it using a software called orca (just Google it ”download orca for MSI”), this property have many values and many options that can be given to it.
The one value that is important here is the amus, so what is amus and how to add all the REINSTALLMODE property:
After installing orca, open it and drag your msi file after building the solution off course.
You will notice a set of records added at the left under the title Tables, scroll down the records until you find a record called “Property” click on it, then its properties will open in the right panel, right click then click add row:, in the Property field write REINSTALLMODE and in the value field add amus, then click OK and save your MSI file.
By doing so your EXE file and all files installed from the setup and not using custom installation will be deleted.
Small note amus stands for:
Upvotes: 2