Click here to Skip to main content
15,892,480 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi All,
I am using windowds installer (*.MSI) set-up project to create MSI file for my Windows Desktop Module.
The installation is done in silent mode (not using the installation wizard) using command like
C#
Setup.msi /q /Lv "mylog.txt" 


For every change made in the code , i create a new set-up file with updated assembly number, Set-up Version number- which updates product code as well.
Also 'Detect Newer Installed version' property is set to True.

I came across a case where set-up number 1.1.115 is installed and still user tries to install set-up number 1.1.114. using the above command.

As expected installation fails as newer version is already installed but it returned incorrect error code as below.



The install fails because of 
MSI (s) (64:08) [10:06:42:216]: Product: "Product name" -- Unable to install because a newer version of this product is already installed.

We are getting error 1603 and I am expecting 1638


ERROR_INSTALL_FAILURE    1603   Fatal error during installation.

I am expecting

ERROR_PRODUCT_VERSION    1638   Another version of this product is already 
                                installed. Installation of this version 
                                cannot continue. To configure or remove 
                                the existing version of this product, use 
                                Add/Remove Programs on the Control Panel.


We always get Error Code 1603 instead of 1638.

i did googled for it but could not come to a conclusion.

Experts please let me know if you have faced this issue before?
What changes do i have to make in setup project in order to get correct ERROR CODE?

Thanks
Amol
Posted
Updated 27-Oct-15 0:58am
v3
Comments
Richard MacCutchan 26-Oct-15 6:24am    
You should report this to Microsoft, it is not an issue we can help with.
Amol_B 26-Oct-15 7:36am    
Thanks.

1 solution

ERROR_PRODUCT_VERSION is not the return code for the error you're seeing - you get the E..P..V error if you try to over-install the same 'productcode' install

you'll probably find the install creator you're using is changing productcode each build

Product/Package/Upgrade codes[^]

(MSI's can only upgrade, they cannot downgrade - bane of my existence)
 
Share this answer
 
Comments
Amol_B 27-Oct-15 7:02am    
Thanks for your reply.
Product Code is fine and that can be updated. ( i did edited end part of my question - how to get correct Error code). Basically i am expecting Error code 1683 to be returned so that my another module can catch it, but setup always returns Error Code 1603
barneyman 27-Oct-15 18:43pm    
as i said, error code 1638 is for a different situation - additionally, 1638 is returned WELL before any copies start - installUIsequence

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900