Hi, Guys.
I have questions about Uninstall process. I use MS VS 2005(C#). I have to use Setup and Deploy project, this is a restriction of product. In the my install process I need to have a custom action to make subscriptions to QuickBooks events, register COM Automation object and make Access DB file, checking if user used before the installer and already have Access DB file. Well, actually it does not meter what should action do. But it is important what this process not so fast. Actually it is several actions, as you can see.
1. And here is the first question: How can I add several custom actions in certain sequence in the Install node? Currently I just have one additional DLL which contains Installer1 class and make all job inside overridden Install method calling internal private methods in necessary sequence to make all job. It looks ugly. But I do not know how to use Installer1, Installer2, Installer3,etc classes if they are placed in the one assembly\DLL (CustomInstallers.dll) , because when I add Project Output I can set only assembly not a class Please help me.
2. When customer uninstalls application other custom action is run and does contrary acts. Currently it works like one custom action, but I prefer to separate it to several custom action, but do not know how I ca make it. This is the same problem like I have described above. But a really problem happens when customer pushes Cancel button during the uninstallation process. I need to catch this event to analyze which part of custom action has been done and which part should be rollbacked. How can I do it? Please advise.
3. I tied to use OnBeforeUninstal and OnAfterUninstall overridden methods �no luck. I even do not why it works so incorrect. This is simplest example from my Installer1 class:
public override void Uninstall(IDictionary savedState)
{
base.Uninstall(savedState);
MessageBox.Show("Uninstall");
}
protected override void OnBeforeUninstall(IDictionary savedState)
{
MessageBox.Show("OnBeforeUninstall");
base.OnBeforeUninstall(savedState);
}
protected override void OnAfterUninstall(IDictionary savedState)
{
base.OnAfterUninstall(savedState);
MessageBox.Show("OnAfterUninstall");
}
During uninstallation process I see next sequence of messages: OnBeforeUninstall, OnAfterUninstall, Uninstall. But I was sure that it should be OnBeforeUninstall, Uninstall, OnAfterUninstall. Could someone explain it?
Thank you