Thanks, I am aware of this. The point I am trying to make is that in my case, the source of the File element above the ServiceInstall is not clear at compile time. As I mentioned, I set a property called [ApplicationDirectory] during execution and this would hold the path that should be set to <File> element's source * ------------------------------------------------------------------------------------------------------------------------------------ Re: [WiX-users] Specify source of exe in ServiceInstall* From: Thomas Due <thomas....@sc...> - 2009-01-26 08:12
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...@gm...] Sent: 26. januar 2009 08:24 To: wix-us...@li... 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