Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Condition for .Net installer class custom action


3 replies to this topic

vishnub

vishnub
  • Full Members
  • 63 posts

Posted 12 June 2007 - 07:03

Hi All,
We are facing problem in the execution of the .Net installer class methods. For us the install method of the .Net installer class has to be executed only during the first time installation and not during patch or upgrade scenarios.

But the install method has been executed always even if that particular .Net dll is not bundled for patch. Then we found out in MSI after build, InstallExecuteSequence table has custom action for the installer class with condition as "$Component>2" which means "component installed locally" or "component installed to run from source" which will be always true, since the component is already installed during first time installation, so setting condition for the Component will not work.

InstallShield is including this custom action with condition during build-time, is there a way to set some condition before build, in the IDE. I read it in blogs, experts suggests to avoid "Managed Code" in Custom action, but we can't change it now during patch.

We are using InstallScriptMSI project on InstallShield 11.5.

Please someone suggest some solution.

Thanks
Vishnu

Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 12 June 2007 - 07:39

The condition to identify a fresh install is (Not Installed). Uninstall can be identified (usually) by (REMOVE="ALL"). (Installed AND (Not REMOVE="ALL")) would mean that the setup is running in maintenance mode since the product is installed and not being uninstalled.
Regards
-Stein Åsmul

vishnub

vishnub
  • Full Members
  • 63 posts

Posted 25 June 2007 - 14:58

Hi Glytzhkof,
Here the problem is not setting the condition, i can set "NOT PATCH", so the action will not get executed during patch installation, but the problem is i need to set this value only after building, i.e., directly modifying the MSI, this manual change might cause issue if missed out.

I want to know where to set the condition in IDE, before building the MSI.

Thanks,
Vishnu

LHarris

LHarris
  • Full Members
  • 1 posts

Posted 17 September 2010 - 14:18

I know this is an old thread but I currently have this same problem with a Basic MSI Project using InstallShiled 2009. There is not a way to set this condition in the IDE.

Flexara's official response after I opened an incident on the issue is that you cannot set the ".NET Installer Class" to Yes if you are planning to patch the install later. They admitted that they do not document this fact anywhere. I believe that they should be adding the "NOT PATCH" condition to the custom actions that they create for the .NET class. They could not give me the reasoning behind why they run the custom actions during an update. My opinion is that this is an InstallShield bug that they should fix since you should not advertise functionality in your product that once used causes you not to be able to update your product. I released an install using this and only found out when a fix was needed that I could not create a small update for it. Flexera's response is that they believe they are implementing the .NET installer class the same way Microsoft does for their Visual Studio MSI solution and they are not going to fix anything.

It is issues like these which is causing my company to reevaluate all the money we spend on InstallShield and its product support and seeing if Wix would be a viable install alternative.