惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

量子位
博客园_首页
罗磊的独立博客
云风的 BLOG
云风的 BLOG
J
Java Code Geeks
Last Week in AI
Last Week in AI
D
DataBreaches.Net
Jina AI
Jina AI
博客园 - Franky
大猫的无限游戏
大猫的无限游戏
Apple Machine Learning Research
Apple Machine Learning Research
V
V2EX
D
Docker
MongoDB | Blog
MongoDB | Blog
B
Blog RSS Feed
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
宝玉的分享
宝玉的分享
Engineering at Meta
Engineering at Meta
The Cloudflare Blog
博客园 - 三生石上(FineUI控件)
有赞技术团队
有赞技术团队
人人都是产品经理
人人都是产品经理
H
Help Net Security
T
The Blog of Author Tim Ferriss

博客园 - 高血压的熊

[转] SSL/TLS/WTLS原理 [转] Windows完成端口与Linux epoll技术简介 [转] STL之list的使用 [转] STL map常用操作简介 [收集] 工作面试时最难的25个问题 [转] 面试必问的16个经典问题的回答思路 [转] const int* p和int* const p [转] 彻底了解指针数组,数组指针,以及函数指针,以及堆中的分配规则 [原] 关于Vista下ERROR_ACCESS_DENIED问题解决办法 [转] Vista UAC详细使用方法 [收集] 经典C/C++面试题(六) [收集] 经典C/C++面试题(五) [收集] 经典C/C++面试题(四) - 高血压的熊 - 博客园 [收集] 经典C/C++面试题(三) [收集] 经典C/C++面试题(二) - 高血压的熊 - 博客园 [收集] 经典C/C++面试题(一) [转] Expect的基本用法 [转] CVS使用手册 [转] Session简介
[转] 如何用WIX ServiceInstall安装Windows服务 - 高血压的熊
高血压的熊 · 2008-07-22 · via 博客园 - 高血压的熊

下面XML代码展示如何利用Wix中的ServiceInstall来自动安装Windows服务

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
  <Product Id="832B8322-6349-4ddd-8AC6-CF18E7A05509" Name="DotNetService"
           Language="1033" Version="1.0.0.0" Manufacturer="Persistent"
           UpgradeCode="6493A097-BA2D-482b-9EDD-2BDBC3E5463E">
    <Package InstallerVersion="200" Compressed="yes" />
    <Media Id="1" Cabinet="WixServiceInstaller.cab" EmbedCab="yes" />
    <Directory Id='TARGETDIR' Name='SourceDir'>
      <Directory Id='ProgramFilesFolder' Name='PFiles'>
        <Directory Id='DOTNETSERVICE' Name='DotNet'>
          <Component Id="InstallService" Guid='AAA67783-EEF0-453f-BBAF-E02B1341E3BC'>
            <File Id="WindowsService" Name="WixServiceInstaller.exe"
                  Source="WixServiceInstaller.exe" KeyPath="yes"/>
            <ServiceInstall Id="ABC"
                            Name="WixServiceInstaller"
                            DisplayName="WixServiceInstaller"
                            Type="ownProcess"
                            Start="auto"
                            ErrorControl="normal"
                            Description="WixServiceInstaller"
                            Account="[SERVICEACCOUNT]"
                            Password="[SERVICEPASSWORD]" />
            <ServiceControl Id="StartWixServiceInstaller"
                            Name="WixServiceInstaller" Start="install" Wait="no" />
            <ServiceControl Id="StopWixServiceInstaller" Name="WixServiceInstaller"
                            Stop="both" Wait="yes" Remove="uninstall" />
          </Component>

        </Directory>
      </Directory>
    </Directory>
    <Feature Id='TheOnlyFeature' Description='Feature contains the single component'
             Level='1'>
      <ComponentRef Id='InstallService'/>
    </Feature>
  </Product>
</Wix>

--------------------------------

from:http://avinashkt.blogspot.com/2007/05/how-to-install-windows-service-using.html