【发布时间】:2018-05-02 09:46:00
【问题描述】:
我遇到了一些问题,我想在服务被卸载时执行。我已将代码添加到 System.ServiceProcess.ServiceProcessInstaller BeforeUninstall 事件和
到覆盖方法 OnBeforeUninstall,但这也不起作用。
当使用我的 InstallShield msi 卸载服务时,此代码不会被执行。
如何强制服务在卸载期间启动某些代码?我需要在我的 C# 服务中使用不同的事件吗?我需要更改 MSI 中的某些内容吗?
注意: 我的问题与以下相同 https://community.flexerasoftware.com/showthread.php?149176-MSI-Uninstall-NET-Service-does-not-launch-BeforeUninstall-event
谢谢, 萨格尔
【问题讨论】:
标签: windows service windows-installer installshield