Search code examples
wix

Run a batch file during WIX installation


I have tried various "solutions" to this problem to no avail. Right now my setup is like this:

    <Fragment>
    <CustomAction Id="BatchCmd" ExeCommand="[INSTALLFOLDER]registerDLL.bat"
Directory="INSTALLFOLDER" Execute="deferred" Return="asyncWait"
     />
    <InstallExecuteSequence>
        <Custom Action="BatchCmd" After="InstallFiles">NOT Installed</Custom>
        
    </InstallExecuteSequence>
</Fragment>

The registerDLL file is part of a WIX component that is defined somewhere else in the file. It is correctly copied to the INSTALLFOLDER directory.

The batch file is not executed at all. And I don't really know how to debug this. I mean gosh, it could not have been any more complex to run a simple batch file.

What is the simplest approach to run a batch file inside WIX?


Solution

  • Not exactly a solution per se, though it is the solution to my specific problem. https://stackoverflow.com/a/1165130/5088769