You have to extract the binary in a custom action and then run it. Disclaimer: I recommend rethinking the problem and not doing it :)
There's a BinaryWrite CA in http://msiext.codeplex.com - http://code.dblock.org/Source/msiext/1.1/Docs/_msi_binary_8h.html#e1b642e8fa3ad62c069a7a76eb90f688. Here's an example of how to extract a .bat during the UI sequence. <Binary Id="MyScript" SourceFile="MyScript.bat" /> <Binary Id="MsiTools" SourceFile="$(var.BinDir)\MsiTools.dll" /> <CustomAction Id="BinaryWrite" BinaryKey="MsiTools" DllEntry="BinaryWrite" Execute="immediate" Return="check" /> <CustomAction Id="SetBinaryWrite_PropertyName" Property="BINARYWRITE_PROPERTYNAME" Value="MyScript" /> <CustomAction Id="SetBinaryWrite_TargetFileName" Property="BINARYWRITE_TARGETFILENAME" Value="[SomeDir]MyScript.bat" /> <InstallUISequence> <Custom Action="SetBinaryWrite_PropertyName" After="CostInitialize">1</Custom> <Custom Action="SetBinaryWrite_TargetFileName" After="SetBinaryWrite_PropertyName">1</Custom> <Custom Action="BinaryWrite" After="SetBinaryWrite_TargetFileName">1</Custom> </InstallUISequence> dB. @ dblock.org Moscow|Geneva|Seattle|New York -----Original Message----- From: Tabmow [mailto:tabmo...@gmail.com] Sent: Monday, August 23, 2010 3:02 PM To: wix-users@lists.sourceforge.net Subject: [WiX-users] Run an internal file pre-install? Hi all, Our wix directory structure (before building with candle & light) contains a 'bin' directory that has various scripts (.bat files) in it. At install time, these get copied into our program's installed directory with no problems. However, I now want to run one of these scripts (a precheck script) after/before the user clicks on the EULA and long before they click on the "Install" button. The problem I'm running into is how do I reference the 'internal' location of the script before it gets copied to the install directory (which happens at a later phase after "Install" is clicked)? I've tried a few things to reference the file but it fails to access it at the right location. How would I go about doing this? Any suggestions/comments greatly appreciated. Thanks. -- View this message in context: http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Run-an-internal-file-pre-install-tp5453804p5453804.html Sent from the wix-users mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Sell apps to millions through the Intel(R) Atom(Tm) Developer Program Be part of this innovative community and reach millions of netbook users worldwide. Take advantage of special opportunities to increase revenue and speed time-to-market. Join now, and jumpstart your future. http://p.sf.net/sfu/intel-atom-d2d _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ Sell apps to millions through the Intel(R) Atom(Tm) Developer Program Be part of this innovative community and reach millions of netbook users worldwide. Take advantage of special opportunities to increase revenue and speed time-to-market. Join now, and jumpstart your future. http://p.sf.net/sfu/intel-atom-d2d _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users