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

Rob Mensching rob at firegiant.com
Fri Jan 6 16:43:18 PST 2023


Yes. Many have done it before you. It is a terrible design but people still do it.

- - - - - - - - - - - - - - -
I provide short answers on wix-users. Full commercial support is offered by FireGiant at http://www.firegiant.com/services



-----Original Message-----
From: wix-users <wix-users-bounces at lists.wixtoolset.org> On Behalf Of Vorray, Rama via wix-users
Sent: Friday, January 6, 2023 2:14 PM
To: wix-users at lists.wixtoolset.org
Cc: Vorray, Rama <rama.vorray at spirent.com>
Subject: [wix-users] Run a batch script during Wix installer startup

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

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/


More information about the wix-users mailing list