I actually struggled a bit with this as well, I discovered that the
easiest way to do that is:

<Component Id="NameServiceComponent" Guid="*" DiskId="1">
    <File Id="ServiceId" Name="FileName" Source="FilePath" />
    <ServiceInstall Id="ServiceInstallId"
DisplayName="ServiceDisplayName" 
        Name="ServiceName" Description="" ErrorControl="normal"
Start="auto" 
        Type="ownProcess" Vital="yes" Account="NT
AUTHORITY\NetworkService"
        Interactive="no"/>
</Component>

Apparently the ServiceInstall node references the file node directly
above it. 

Thomas Due

-----Original Message-----
From: Anupama A [mailto:anupama...@gmail.com] 
Sent: 26. januar 2009 08:24
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Specify source of exe in ServiceInstall

I am trying to write an installer for a Windows Service. Depending on
the
deploy environment, I set a property called [ApplicationDirectory].
I have a separate component which copies all files from
[ProgramFilesFolder]
to [ApplicationDirectory] depending on what is dynamically set.

And then the service install from the new location
[ApplicationDirectory]
should happen.
In the below statement how do I specify the "Service1.exe" is in the
[AppDirectory] path:

<ServiceInstall Id="Service1Installer" Name="Service1.exe"
Type="ownProcess"
Start="auto" Vital="yes" ErrorControl="normal"></ServiceInstall>

Wrapping this within a File element with the source pointing to the exe
from
the new location will fail at compile time as [AppDirectory] will not be
set
then.


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to