I have a MSI setup to Install and Uninstall my Windows Service App.. I have written the code to remove Windows Service in Uninstall function.. here, my problem is, the MSI setup trying to delete files before the Uninstall function call and then I am receiving the below warning msg:
My Installer class code:
[RunInstaller(true)]
public partial class Installer1 : Installer
{
public Installer1()
{
InitializeComponent();
}
public override void Install(IDictionary savedState)
{
base.Install(savedState);
//Add custom code here
}
public override void Rollback(IDictionary savedState)
{
base.Rollback(savedState);
//Add custom code here
}
public override void Commit(IDictionary savedState)
{
base.Commit(savedState);
Program.InstallService();
}
public override void Uninstall(IDictionary savedState)
{
Program.UnInstallService();
base.Uninstall(savedState);
}
}
Can anyone help me to bypass this error msg?