[wix-users] Run a batch script during Wix installer startup

Vorray, Rama rama.vorray at spirent.com
Fri Jan 6 14:14:22 PST 2023


We have below code which we use to run some basic commands at the very early stage of installer startup:

        <Property Id="WixQuietExecCmdLineTest" Value= '"net" use D: /DELETE /Y'/>
        <CustomAction Id="CA_DDriveAutofixTest" BinaryKey="WixCA" DllEntry="WixQuietExec" Execute="immediate" Return="ignore"/>
        <InstallExecuteSequence>
            <Custom Action="CA_DDriveAutofixTest" Before="FindRelatedProducts">NOT Installed</Custom>
        </InstallExecuteSequence>

But is it possible to run a .bat script using this method? The .bat script is already present on the system (installed by another installer already) in C:\<some folder>\. I just need to run it and decide whether to proceed with installation or to stop. Is that possible with Wix? This needs to happen at the earliest possible stage in the installer execution.

Best regards


More information about the wix-users mailing list