In that case, I can probably use installutil to install my windows service.
Again how can I achieve something like this?

<InstallExecuteSequence>
      <Custom Action='ManagedInstall' After="InstallFinalize" />
    </InstallExecuteSequence>

<CustomAction Id="ManagedInstall" Directory="*[ApplicationDirectory]*"

ExeCommand='"[WindowsFolder]\Microsoft.NET\Framework\v2.0.50727\installUtil.exe"
/LogToConsole=false **Service1.exe'
          Return='check'>
    </CustomAction>

I want to mention the source of the exe to be different than the
[ProgramFilesFolder], some other directory, the value which is set in
[ApplicationDirectory]


---------------------------------------------------------------------------------------------------------------------------------
*Re: [WiX-users] Specify source of exe in
ServiceInstall<https://sourceforge.net/mailarchive/message.php?msg_name=DE33023B477FE44EAA71983F5279F6CE50FCE09D3A%40NA-EXMSG-C102.redmond.corp.microsoft.com>
*
From: Rob Mensching <rob.mensch...@mi...> - 2009-01-26 22:38
  ServiceInstall in MSI doesn't support that scenario. MSI SDK says
ServiceInstall always points at the key path of the Component.

-----Original Message-----
From: Anupama A [mailto:anupama...@gm...]
Sent: Monday, January 26, 2009 07:32
To: wix-us...@li...
Subject: Re: [WiX-users] Specify source of exe in ServiceInstall

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

Reply via email to