If you attempt to install an application with ProductCode A and Package Code B but there is already an application installed with ProductCode A and PackageCode C, you get the following error code: 1638.  I have repackaged application X but the legacy version of application X exists on most of the machines in the environment right now.  My wrapper will take care of removing the legacy version before putting down the repackaged version, however, I would still like to put in a custom action that detects this legacy version and fails.  When it fails, I would like it to fail with 1638 not 1603.  Is there a way I can accomplish this?

0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Community Chosen Answer

3

unfortunately you have very little control over the exit code generated by an MSI installer Custom Action, and only a limited number of available 'choices'..

For more info on this see: http://msdn.microsoft.com/en-us/library/windows/desktop/aa369778%28v=vs.85%29.aspx

 

Answered 07/06/2012 by: pjgeutjens
Red Belt

Please log in to comment

Answers

1

Run it using a script and return a code whatever you want.

Answered 07/08/2012 by: piyushnasa
Red Belt

Please log in to comment
-1

use a batch script to install the msi

add the following line:

SET ERROR=%ERRORLEVEL%
IF "%ERROR%" == "1603" SET ERROR=1638 

Answered 07/31/2012 by: Rvlieburg
Third Degree Blue Belt

Please log in to comment
Answer this question or Comment on this question for clarity