I am trying to use WiX to make a installer. Now I want to create a new file in install location. (A configuration contains install location written in JSON).
I created a custom action, and I past install location to my action like this:
<InstallExecuteSequence>
<Custom Action="InstallChromeExtension.SetProperties" After="CostFinalize"></Custom>
<Custom Action="InstallChromeExtension" After="CostFinalize">NOT Installed AND NOT REMOVE</Custom>
</InstallExecuteSequence>
<Fragment>
<CustomAction Id="InstallChromeExtension" BinaryKey="ExtensionActionDll" DllEntry="InstallAction" Execute="immediate" Impersonate="no" Return="check" />
<CustomAction Id="InstallChromeExtension.SetProperties" Property="InstallChromeExtension" Value="INSTALLLOCATION=[INSTALLLOCATION]" Execute="immediate" />
<Binary Id="ExtensionActionDll" SourceFile="ExtensionAction.dll" />
</Fragment>
And I used CreateFile
to create a new file, but Error 3 I got.
I google it said must set action as deferred, and I cannot get install location in deferred action. Can you help me ? Thanks.