Change id of binary generated by using ElevatedManagedAction

Jan 10 at 4:10 PM
Hi,

When using elevatedmanagedaction in WixSharp, I get the following generated Wix file:

<CustomAction Id="Action2_SetJavaEnvironment" BinaryKey="Action2_SetJavaEnvironment_File" DllEntry="SetJavaEnvironment" Return="check" Impersonate="no" Execute="deferred" />
<CustomAction Id="Action3_RemoveJavaEnvironment" BinaryKey="Action2_SetJavaEnvironment_File" DllEntry="RemoveJavaEnvironment" Return="check" Impersonate="no" Execute="deferred" />

<Binary Id="Action2_SetJavaEnvironment_File" SourceFile="C:\Public\MergeModules\CustomActions.CA.dll" />
Is it possible to change the id of the binary node generated by creating an elevatedmanagedaction in WixSharp? I will also need to change the BinaryKey of the customaction nodes to match that new id.

Thanks!
Coordinator
Jan 10 at 11:35 PM
Yes it is. You can use the technique described in this post answer: https://wixsharp.codeplex.com/discussions/660553
But why do you need to do this? Are you reusing the binaries for other non-CA purposes??
Jan 12 at 12:57 PM
Thanks Oleg,

I am adding the elevatedmanagedaction in an MSM. When trying to build the MSM, the "Id" of the Binary Node is too long due to WIX adding the GUID of the MSM to the end of the "Id". The "Id" I use will have to have at the most 18 characters.