Click here to Skip to main content
15,886,199 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a VS Setup project that was created a while back. I have copied and modified it to work with a newer set of code. The original setup would run the custom actions (Install and Commit) when it was installed new and on a version upgrade (removing the older version).

The version I copied and modified runs the custom action on the new installation, but when I try to upgrade the older version the custom actions never execute. I have put message boxes in to verify the code is not executed.

I am sure I am missing a part of setting up the custom action but I have no idea what. I have compared both the custom action (installer class) code and the setup project, but they seem to match.

Does anyone have an idea why the custom actions would not be called on an upgrade?
Posted
Updated 19-Sep-14 8:36am
v3
Comments
[no name] 19-Sep-14 14:12pm    
Check the launch condition for your CA and look at the log file to see what is going on.
cotsjdixon 19-Sep-14 14:39pm    
I am not very familiar with the installs. Where would I find the log files?
cotsjdixon 22-Sep-14 7:51am    
After more web searching I found that there appears to be a bug in Visual Studio that make the older version of the CA run on an upgrade, not the new one. (I am currently running 2008.) Does anyone know how to make the upgrade run the NEW CA instead of the OLD CA? I really need it to run the new one....

You will have to open up the built msi in tools such as Orca, and check the custom action conditions. Most probably, they are set such a way that they do not run during upgrades.

Refer to this link --> [^] for information on how to log the install.

-Alpesh
 
Share this answer
 
Comments
cotsjdixon 19-Sep-14 14:53pm    
I have looked at them in Orca, but I cannot tell if something is indicating not to run on updates. I compared the Orca information to that of the original version install that does work properly and they look the same to me. Any idea what they should indicate for upgrades? I see something in the InstallExecuteSequence table that appears to be call the CA (_2C3D43E8_27F8_4B53_A3CA_ED08887E6DD9.install for example) that has a condition of $C__12E1A32E7866D3A3DC428685C3FB09FD>2. I assume this means run the CA when something is greater than 2. I have no idea if this is the CA or not, nor do I have any idea what the 2 indicates.
After searching more on the web, I found that there is a bug in Visual Studio that will run the previous version of the CA not the new one. You must change the name of the new CA for it to run.

Once I renamed the CA project it started running.
 
Share this answer
 

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