-1

我是 WIX 的新手,正在尝试创建一个 MSI 来安装服务。安装项目正在生成一个 .wixlib 对象,而不是一个 msi。我正在研究这个例子

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
    <!-- TODO: Put your code here. -->
<Product Name="Smart Elf Service"
       Id="*"
       UpgradeCode="927E7BBE-58C0-4832-A821-24A6B19AEE63"
       Version="1.0.0.0"
       Manufacturer="Me!"
       Language="1033">
<Package
  Manufacturer="Me!"
  InstallerVersion="100"
  Languages="1033" />
  <Directory Id="TARGETDIR" Name="SourceDir">
    <Directory Id="ProgramFilesFolder" Name="Program Files(x86)">
      <Directory Id="CorporationFolder" Name="Corporation">
        <Directory Id="SmartElfFolder" Name="SmartElf Service">
          <Component Id="SmartElfService">
            <File Id="SmartElfServiceBinary" Name="ElfVerificationService.exe" Source ="..\ElfVerificationService\bin\debug\ElfVerificationService.exe" KeyPath="yes" Vital="yes"/>
            <ServiceInstall
              Id="SI_SmartElfService"
              Vital="yes"
              Name="sesvc"
              DisplayName="SmartElf Service"
              Start="auto"
              ErrorControl="normal"
              Type="ownProcess"
            />

            <ServiceControl
              Id="SC_SmartElfService"
              Name="sesvc"
              Start="install"
              Stop="both"
              Remove="uninstall"
              Wait="yes"
            />
          </Component>
        </Directory>
      </Directory>
    </Directory>
  </Directory>
<Feature Id="DefaultFeature" Level="1">
  <ComponentRef Id="SmartElfService"/>
</Feature>
</Product>
</Wix>
4

1 回答 1

4

右键单击解决方案资源管理器中的项目,然后选择属性。确保输出类型设置为 Windows Installer Package (.msi)。

于 2012-10-22T17:43:10.053 回答