Last post Jun 23, 2009 10:59 AM by staplefordbill
Jun 06, 2009 04:04 AM|staplefordbill|LINK
I've already raised this but in the wrong forum so I'll try again:
I'm using a Deployment Project in Visual Studio 2008. I have a custom action on the Install event to create a database and configure mail settings when the web application is installed. If however I install a newer version of the application, the custom
action for the new version fires and I don't want it to. How can I stop this other than running msiexec and passing in a parameter such as "upgrade=true" to the msi file?
I set the condition "not Installed" on the Install action, but it makes no difference. An old post explains why:
Understand that "Installed" means mainly "is my ProductCode
guid already installed", so if you change that guid (as you *must* for
RemovePreviousVersions to work) "Not Installed" is a meaningless test.
Jun 11, 2009 02:06 AM|Nowall|LINK
When executing .exe, the custom action will be invoked. You can try to set a flag in target machine, and check this flag to determine whether to install database.
Jun 23, 2009 10:59 AM|staplefordbill|LINK
Yes, that worked. In the Install custom event, I check for a WebsiteInstalled flag. If it's set then I know a previous version of the app is installed and continue with the the upgrade logic. If it's not set then I set it and continue with the full installation