Reputation: 127
I'm new to WIX and Burn. I'm trying to install a .bat file and then run it. The .bat file runs other MSIs and so it can't be run from within a setup project.
I've tried 2 approaches, both using Burn:
Approach 1. I've tried adding the batch file as a payload to burn, but I can't figure out how to reference the .bat file on the target machine...
<Bundle Name=...>
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense" >
<Payload Id="QuickTimeSilentInstallBAT" Compressed="yes" SourceFile="C:\QT\QuickTimeSilentInstall.bat"
</BootstrapperApplicationRef>
<Chain>
<PackageGroupRef Id="NetFx45Redist"/>
<ExePackage Id="QuickTimeSilentInstallExePKG" Name="QuickTimeSilentInstall.bat" />
</Chain>
</Bundle>
So here I get an error that the ExePackage name is invalid because it contains the '.' character. I'm trying to put the .bat filename into the 'name' attribute because the documentation here http://wixtoolset.org/documentation/manual/v3/xsd/wix/exepackage.html describes the name attribute as 'The destination path and file name for this chain payload'
Approach 2 In a burn chain first install a separate MSI that deploys the .bat file.... Follow that with an ExePackage to run that .bat file. My problem with this is I don't know how to determine the path of the .bat file on the target machine (without hardcoding it) - I tried referencing the project that deploys the .bat - but I can't find a way to access the relevant 'Directory'
Context I'll mention this just in case there's a better way to achieve my goal - I'm trying to do a silent install of QuickTime onto the target machine. This involves calling 2 msis and one exe - so that's what my .bat file is doing
Upvotes: 0
Views: 1049
Reputation: 21886
Approach 3: Do what the batch file does in Burn instead. Use MsiPackage
and ExePackage
elements directly instead of trying to run a batch file. (An ExePackage
can't run a batch file anyway.)
Upvotes: 2