I had a problem with wix and managed user actions: in my custom action, I create a file and save it in the INSTALLLOCATION path. This seems to work, no exception is thrown. But after installation, the newly created file does not exist in INSTALLLOCATION.
WiX file:
<CustomAction Id="SetInstallPath" Property="CreateTimeStamp" Value="[INSTALLLOCATION]" Execute="immediate"/> <CustomAction Id="CreateTimeStamp" BinaryKey="SetupActions.dll" DllEntry="CreateTimeStampFile" Execute="deferred" Return="check"/> <InstallExecuteSequence> <Custom Action="SetInstallPath" Before="InstallFinalize"/> <Custom Action="CreateTimeStamp" Before="InstallFinalize"/> </InstallExecuteSequence>
Custom-Action-Methode:
... var keys = new string[session.CustomActionData.Keys.Count]; session.CustomActionData.Keys.CopyTo(keys, 0); var cad = keys[0]; var filepath = cad + "myfile.xml"; File.Create(filepath); ...
Any idea?
Edited: after a message from Scott Bettger, the edited contents of the wix file.
c # wix custom-action
rhe1980
source share