wix - Wix - 如何在 MSI Uninstall 上卸载服务
问题描述
我希望你们今天特别开心,身体健康!我只需要一些 Wix 安装程序的帮助。我有一个使用 WIX 创建的 .msi 安装程序。安装程序还会安装一些 Windows 服务。安装 .msi 后,服务已安装并正常运行。但是在卸载/删除 .msi 时,服务不会被删除。以下是我正在使用的代码,如果我的代码有任何问题,请纠正我:
<Directory Id="serviceencrypt" Name="service-encryption">
<Component Id="MyAppEncryption">
<File
Id="MyAppEncryptionEXE"
Name="MyApp.Encryption.exe"
DiskId="1"
Source="$(var.MyAppInstallerFiles)\application\service-encryption\MyApp.Encryption.exe"
Vital="yes"
KeyPath="yes" />
<ServiceInstall Id="MyAppEncryptionInstall" Type="ownProcess" Vital="yes"
Name="MyAppEncryption" DisplayName="MyApp Encryption"
Description="MyApp Encryption" Start="auto"
ErrorControl="normal"
Arguments=" action:run" Interactive="no" Account="NT AUTHORITY\LocalService">
</ServiceInstall>
<ServiceControl Id="MyAppEncryptionStartService" Stop="both" Start="install" Remove="uninstall"
Name="MyAppEncryption" Wait="yes" />
</Component>
</Directory>
任何帮助都感激不尽。谢谢!
解决方案
推荐阅读
- amazon-web-services - 通过会话管理器连接到 Windows EC2 实例时出错
- pentaho - 使用日志从存储库运行 Pentaho 作业
- c# - 重命名文件就是重命名文件的扩展名
- java - 我正在尝试学习为 Java 中的 Discord 编写机器人,但出现错误:java.lang.ClassNotFoundException: net.dv8tion.jda.api.JDABuilder
- javascript - 使用生成的数组列表的输入值调用函数
- python - 如何区分 Django 模板中的两种形式?
- android - 清单看不到活动 - Android
- r - 有没有办法在 R 中选择性地收集网络数据?
- integromat - 基于 Integromat 场景创建脚本
- reactjs - 使用钩子时出错我不知道出了什么问题