You can use other custom actions to concatenate several properties:

<CustomAction Id="MyString1" Property="MyString1" 
Value="[PropA][PropB][PropC]"/>
<CustomAction Id="MyString2" Property="MyString2" 
Value="[PropD][PropE][PropF]"/>
<CustomAction Id="MyString3" Property="MyString3" 
Value="[PropG][PropH][PropI]"/>
<CustomAction Id="MyWholeString" Property="MyWholeString" 
Value="[MyString1][MyString2][MyString3]"/>
<InstallExecuteSequence>
  <Custom Action="MyString1" After="WhereverYouWantToStart" />
  <Custom Action="MyString2" After="MyString1" />
  <Custom Action="MyString3" After="MyString2" />
  <Custom Action="MyWholeString" After="MyString3" />
  <Custom Action="YourOriginalCustomAction" After="MyWholeString" />
</InstallExecuteSequnce>

MyWholeString will end up being
[PropA][PropB][PropC][PropD][PropE][PropF][ProG][PropH][PropI]


You can do this as little or as much as needed.  Each of the three strings in 
this example can hold up to 255 characters.  That's before actually converting 
each property into its value.


Matt Johnson MCPD, MCTS, MCSD, MCDBA
Director of Application Development
Time America, Inc.
ma...@timeamerica.com | www.timeamerica.com


-----Original Message-----
From: Navid Azimi-Garakani [mailto:naz...@microsoft.com] 
Sent: Thursday, May 06, 2010 9:57 AM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Best way to 'fix' string overflow in ExeCommand for CAs

I have a custom action that ends up calling an executable with a large number 
of parameters (specifically, the parameters contain fully qualified paths). 
This naturally ends up causing the ExeCommand to exceeds its length limit.

  <CustomAction
      Id="ImportConfiguration"
      Directory="ConfigurationFolder"
      ExeCommand="..."
      Return="check" />

What is the best (or recommended) way of handling the scenario where you 
*cannot* reduce the length of the string directly? Do you generate a .cmd on 
the fly and execute it that way? Do you move it as proper C# custom action and 
run with the Process object?

Thanks,
Navid
------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------

_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to