【发布时间】:2014-12-24 01:58:49
【问题描述】:
我有一个 MSI 设置来安装和卸载我的 Windows 服务应用程序。我已经编写了代码来删除 卸载 功能中的 Windows 服务。这里,我的问题是,MSI 设置尝试在 Uninstall 函数调用之前删除文件,然后我收到以下警告消息:
我的安装程序类代码:
[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);
}
}
谁能帮我绕过这个错误消息?
【问题讨论】:
标签: c# visual-studio installation windows-installer