Reputation: 381
I would like to run an executable file with a quiet execution custom action during the InstallUISequence phase.
This executable has a text file as a parameter. I don't want that text file to be installed and I can't put it on the directory/file part as it is intented to use during the UI sequence.
How can I do that?
Here is a sample code to explain what I want:
<CustomAction Id="RunIsql_cmd" Property="RunIsql" Value=""[MYEXE]" -U [PARAM1] -i **myFileFromThePackage.txt** Execute="immediate"/>
<CustomAction Id="RunIsql" BinaryKey="WixCA" DllEntry="CAQuietExec" Execute="immediate" Return="check" Impersonate="no"/>
How can I define myFileFromThePackage.txt ?
I've tried to define the file like this:
<Binary Id="DummyFileForInstallOnly" SourceFile="myFile.txt" />
But I can't associate the id to the CA..
Upvotes: 3
Views: 319
Reputation: 21426
Adding it in Binary table is a good approach, but you also need to extract it during install in order to use it. This can be done through a custom action which uses the Windows Installer database API.
You will also need a custom action to delete the extracted file after it has been used.
Upvotes: 3