wixwindows-installerwix3.5bootstrapperwix3.7

Run PowerShell script at end of bundle chain execution


I am creating a exe installer using Wix Bootstrapper.

In the bundle chain I am installing some exe files.

In the end I want to execute a PowerShell script to do some additional tasks. How is it possible

Here is the bundle chain and I have mentioned where I want to execute a PowerShell script.

   <Bundle Name="sample" Version="0.0.0.0" Manufacturer="$(var.Manufacturer)" UpgradeCode="fsfsddssdsdsd">
        <BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense" />
        <Chain>

            <ExePackage
                SourceFile="something.exe"
                InstallCommand="/install /quiet /norestart"
                PerMachine="yes" >
            </ExePackage>

            <ExePackage
                SourceFile="anything.exe"
                InstallCommand="/install /quiet /norestart"
                PerMachine="yes" >
            </ExePackage>


            **EXECUTE POWERSHELL SCRIPT HERE**
            
        </Chain>
    </Bundle>

Thanks in advance for any help


Solution

  • I can see two options for now:

    1. Create msi that is doing all your stuff.

    You can run powershell script as described here

    1. Create your own bootstrapper application that will run script after all exe was installed. As I remember there's special event for this case.

    Here you can find great article about it (C#). Also you can easily find how to do it using C++.