Friday, May 25, 2007

How to use WIX's ServiceInstall to install Windows Service?

In continuation of my previos post ( How to create an installer using WIX ... )...
Following is code snippet for using ServiceInstall in WIX...

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="">
<Product Id="832B8322-6349-4ddd-8AC6-CF18E7A05509" Name="DotNetService"
Language="1033" Version="" Manufacturer="Persistent"
<Package InstallerVersion="200" Compressed="yes" />
<Media Id="1" Cabinet="" 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"
<ServiceControl Id="StartWixServiceInstaller"
Name="WixServiceInstaller" Start="install" Wait="no" />
<ServiceControl Id="StopWixServiceInstaller" Name="WixServiceInstaller"
Stop="both" Wait="yes" Remove="uninstall" />
<Feature Id='TheOnlyFeature' Description='Feature contains the single component'
<ComponentRef Id='InstallService'/>

Suggested Link:
Installing Services using Wix-


Anonymous said...

Nvin Installer is a simple installer developed using WiX toolset. It is really useful if somebody don't want scratch their head to create MSI files.

aiyipianni said...
This comment has been removed by a blog administrator.
aiyipianni said...
This comment has been removed by a blog administrator.
buy wow gold said...
This comment has been removed by a blog administrator.
Elisabeth Yusnita said...

Hi ,

Please advice how if i need the dialog wizard from installed service show up during installation.
Example :
I need to install apache tomcat (this is supporting tools for my app). and beside only execute i need the dialog wizard from apache tomcat application show up.. so i can configure it.
Many thanks

Ayyanar said...

I have used and tried the steps that mentioned in this page. But I got the error when i am trying to install that created msi "InstallUtil.dll: Unknown Error"

Can you tell me the solution for this problem?

Thanks in advance...

Dave Hamdan said...

Thanks for the article. As a note: adding the node in Windows 8.1 caused many headaches. I don't have time right now to research why, but it made the service get 'stuck' during the uninstall process requiring manual removal of the service, reboots, etc.