小编alr*_*tyy的帖子

Wix MSI包:用于Windows服务

错误:使用WiX工具集为Windows服务创建新的安装程序.无法安装该服务.获取错误
错误截图

环境

  • 微软视觉工作室2017
  • Windows 7的
  • WiX工具集v3:MSI的安装项目

问题/目标

我想创建一个安装Windows服务的MSI.

安装时:

Windows服务已在services.msc中安装并可见

在UnInstall上:

停止并删除该服务.

我的Windows服务有很多依赖项,在运行服务时使用.

我已将所有文件添加ServiceDependency为组件并为每个组件ID 添加,但仍无法解决错误.事件查看器中的错误也与上面的屏幕截图相同.

任何指针都是最受欢迎的.

我的守则

    <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />

    <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
    <MediaTemplate EmbedCab="yes" />

    <Feature Id="ProductFeature" Title="LayoutSwitcher" Level="1">
        <ComponentGroupRef Id="ProductComponents" />
    </Feature>
</Product>

<Fragment>
    <Directory Id="TARGETDIR" Name="SourceDir">
        <Directory Id="ProgramFilesFolder">
            <Directory Id="INSTALLFOLDER" Name="LayoutSwitcher" />
        </Directory>
    </Directory>
</Fragment>

<Fragment>
    <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">

  <Component Id="PlcmLayoutSwitcherWinSvc.exe" Guid="PUT_GUID_HERE" KeyPath="yes">
            <File Id="LayoutSwitcherWinSvc.exe" 
 Name="LayoutSwitcherWinSvc.exe" Source="$(var.LayoutSwitcherWinSvc_TargetDir)LayoutSwitcherWinSvc.exe" />

    <CreateFolder />
    <ServiceInstall Id="LayoutSwitcher" Type="ownProcess" Vital="yes" 
                    Name="LayoutSwitcher" …
Run Code Online (Sandbox Code Playgroud)

c# windows windows-installer windows-services wix

5
推荐指数
1
解决办法
3229
查看次数

标签 统计

c# ×1

windows ×1

windows-installer ×1

windows-services ×1

wix ×1