Run the WiX EXE CustomAction app from TempFolder
I am using WiX 3.5 for the following.
I have several files (EXE and DLL) that I need to extract to the TEMP folder at the beginning of the installation (before the EULA is displayed), then run the EXE. I have a piece of work that fetches files using http://msiext.codeplex.com/ . The code looks like this:
<CustomAction Id="SetBinaryWrite_TargetFileName_1" Property="BINARYWRITE_TARGETFILENAME" Value="[TempFolder]ActivationUtility.exe" />
Note that [TempFolder] is used and (on Windows 7) "C: \ Users \ USERNAME \ AppData \ Local \ Temp \" is allowed and it is not "configured" anywhere in my WXS files - it is Windows Properties such as ProgramFilesFolder etc.
I configured my EXE CustomAction like this:
<CustomAction Id="ActivationUtility"
Directory="TempFolder"
ExeCommand="ActivationUtility.exe"
Execute="immediate" Return="check" />
The linker then complains: error LGHT0094: Unresolved symbol reference "Directory: TempFolder". If I use "[TempFolder]" the compiler complains. Why does this property work for one CustomAction but not another? What exactly do I need to do to reference the TempFolder for the above CustomAction?
The following code compiles for me (can't test it right now)
Add this under your root directory
<Directory Id="TempTest" FileSource="[TempFolder]"></Directory>
And declare a custom action like this
<CustomAction Id="ActivationUtility"
Directory="TempTest"
ExeCommand="ActivationUtility.exe"
Execute="immediate" Return="check" />
You can of course change your folder id