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.
MyInstaller.Uninstall() not being executed …
Started by
Jian
, Apr 21 2008 20:04
5 replies to this topic
Posted 21 April 2008 - 20:04
Hi, Stefan,
Thanks for posting many valuable info online … I am hoping that you could help me with the following:
I created a class MyInstaller descending from Installer and override the Install and Uninstall. In the Setup Project, I added the Custom Actions to Install and Uninstall. It worked well for any version Install and Uninstall as long as there is NO other version installed.
We need to support multiple versions of the product. I discovered that for subsequent versions, only Install works OK. Uninstall was not executed -- I put a few “EventLog.WriteEntry("MyInstaller", message);” in my MyInstaller, entries are logged during Install but NONE for Uninstall.
I read your article “Component, package, product and upgrade codes in Windows Installer”. Is it true that I have to change the ComponentId for each version for the Uninstall to be activated? How could I change the ComponentId in the Setup project (I am using VS2003)?
I have posted this in a few places but nobody was able to help so far.
Any help would be greatly appreciated …
Thanks very much ...
Jian.
Thanks for posting many valuable info online … I am hoping that you could help me with the following:
I created a class MyInstaller descending from Installer and override the Install and Uninstall. In the Setup Project, I added the Custom Actions to Install and Uninstall. It worked well for any version Install and Uninstall as long as there is NO other version installed.
We need to support multiple versions of the product. I discovered that for subsequent versions, only Install works OK. Uninstall was not executed -- I put a few “EventLog.WriteEntry("MyInstaller", message);” in my MyInstaller, entries are logged during Install but NONE for Uninstall.
I read your article “Component, package, product and upgrade codes in Windows Installer”. Is it true that I have to change the ComponentId for each version for the Uninstall to be activated? How could I change the ComponentId in the Setup project (I am using VS2003)?
I have posted this in a few places but nobody was able to help so far.
Any help would be greatly appreciated …
Thanks very much ...
Jian.
Posted 23 April 2008 - 11:08
I think what you want is a Major Upgrade. For this, you need to change the ProductCode and set "Detect previous version" and "Remove previous version" both to True in Visual Studio.
Stefan Krüger
InstallSite.org twitter facebook
Posted 24 April 2008 - 18:27
Thanks, Stefan,
I tried your recommendation – both install and uninstall works but it removes my previous version. And I needed to support multiple versions (can you believe how tough my boss is .
If I use the wix, I could easily change the ComponentId. But I cannot stand xml programming. I like the Setup much better until …
I have tried a lot to trigger a ComponentId change in Setup, it seems to me the only way I could do it is to change the assembly name (changing source folder name, or output path only changes the Component and the KeyPath which didn’t help).
And once I triggered a ComponentId change (use Orca to verify), both install and uninstall works to support multiple versions. But this means every time I have to do a release, I have to modify my project to change the assembly name in addition to change the Setup project!! Very sad!!
How does Windows Installer address the support of multiple versions? This should be a valid use case, I hope. I thought one of the main reasons we move from dll hell to .NET assemblies is the strong version control and the support of multiple versions.
Could you voice this use case to the Windows Installer community?
Thanks a lot for your time.
P.S. Please let me know if you have better ways to trigger a ComponentId change in Setup.
Jian.
I tried your recommendation – both install and uninstall works but it removes my previous version. And I needed to support multiple versions (can you believe how tough my boss is .
If I use the wix, I could easily change the ComponentId. But I cannot stand xml programming. I like the Setup much better until …
I have tried a lot to trigger a ComponentId change in Setup, it seems to me the only way I could do it is to change the assembly name (changing source folder name, or output path only changes the Component and the KeyPath which didn’t help).
And once I triggered a ComponentId change (use Orca to verify), both install and uninstall works to support multiple versions. But this means every time I have to do a release, I have to modify my project to change the assembly name in addition to change the Setup project!! Very sad!!
How does Windows Installer address the support of multiple versions? This should be a valid use case, I hope. I thought one of the main reasons we move from dll hell to .NET assemblies is the strong version control and the support of multiple versions.
Could you voice this use case to the Windows Installer community?
Thanks a lot for your time.
P.S. Please let me know if you have better ways to trigger a ComponentId change in Setup.
Jian.
Posted 25 April 2008 - 17:17
QUOTE |
I tried your recommendation – both install and uninstall works but it removes my previous version. And I needed to support multiple versions |
Sorry for the misunderstanding.
Unformtunately I don't know an easy solution. Installer class custom actions tend to be problematic.
Unformtunately I don't know an easy solution. Installer class custom actions tend to be problematic.
Stefan Krüger
InstallSite.org twitter facebook
Posted 25 April 2008 - 17:48
Thanks, Stefan,
Let's hope the future releases of the Installer would be better ...
I have learnt a lot from your articles and blogs – please keep up with the great work ...
By the way, some of your ComponentId postings are in German, and it is my first time using Google translate to understand your narrative – it is great!!
Thanks again.
Jian.
Let's hope the future releases of the Installer would be better ...
I have learnt a lot from your articles and blogs – please keep up with the great work ...
By the way, some of your ComponentId postings are in German, and it is my first time using Google translate to understand your narrative – it is great!!
Thanks again.
Jian.
Posted 25 April 2008 - 17:49
Cool. But all those articles should also be available in English. If you post the link to the article you are looking at, I'll post the link to the English equivalent.
Stefan Krüger
InstallSite.org twitter facebook