Hello Emma,
 
You can't set the value of a property using another property in that
manner.  You actually need to use another CustomAction.  
 
<CustomAction Id="SetCommand" Property="QtExecDeferred"
Value="&quot;[SystemFolder]\Net.exe start myservice&quot;" />

You will also need to schedule this Custom Action.

<InstallExecuteSequence>

  <Custom Action="SetCommand" Before="InstallFiles" />

Michael


  _____  

From: Emma Hanna [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, 5 December 2006 1:36 PM
To: Michael Osmond; wix-users@lists.sourceforge.net
Subject: RE: [WiX-users] Optional Service Start - Help Needed



Hi Michael

 

This worked - thank you.

 

However, in order to get it to work properly I had to set the value of
the command line directly to the net.exe - i.e.

 

<Property Id="QtExecDeferred" Value="&quot;c:\windows\system32\Net.exe
start myservice&quot;"/>

<CustomAction Id="QtExecDeferred" BinaryKey="WixCA"
DllEntry="CAQuietExec" Execute="deferred" Return="check">

 

I need to use the system folder property like so:

<Property Id="QtExecDeferred" Value="&quot;[SystemFolder]\Net.exe start
myservice&quot;"/>

 

But this fails, as it does not evaluate the property.

 

Could someone give me some help on how to do this?

 

Cheers

Emma.

 

  _____  

From: Michael Osmond [mailto:[EMAIL PROTECTED] 
Sent: Monday, 4 December 2006 12:37 PM
To: Emma Hanna; wix-users@lists.sourceforge.net
Subject: RE: [WiX-users] Optional Service Start - Help Needed

 

Emma,

 

You could use a custom action to start the service at the end of the
install, and condition the custom action from the check box.


To start a service use the command NET Start XXXX.  Use the WIX qtexec
custom action to run the command.

 

Michael

 

  _____  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Emma Hanna
Sent: Monday, 4 December 2006 9:28 AM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Optional Service Start - Help Needed

When installing a windows service with WIX, I need for the service to be
optionally started or not, depending on input from the user (a check box
or the like). I have tried doing this using two separate components and
adding a condition, and this appears to work, however does not uninstall
properly. Could someone advise me on the best way to go about
implementing this solution?

Thanks

Emma.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to