Wix工具集msi不从powershell脚本安装其他安装程序

Wix工具集msi不从powershell脚本安装其他安装程序,wix,windows-installer,wix3.5,wix3,Wix,Windows Installer,Wix3.5,Wix3,我正在使用wix工具集创建MSI安装程序 我的MSI将在自定义操作中运行powershell脚本。 然后,powershell脚本(MYSCRIPT.ps1)将为依赖项执行安装程序。让我们将此依赖项命名为D 当我运行powershell脚本时,D将完美地安装在我的系统中 但是 当我运行从wix创建的MSI时,powershell脚本会运行,但它无法安装D。 为什么会这样 我怀疑windows不允许多个安装程序(我的MSI由wix生成,installer for D由powershell脚本执行)

我正在使用wix工具集创建MSI安装程序

我的MSI将在自定义操作中运行powershell脚本。 然后,powershell脚本(MYSCRIPT.ps1)将为依赖项执行安装程序。让我们将此依赖项命名为D

当我运行powershell脚本时,D将完美地安装在我的系统中

但是

当我运行从wix创建的MSI时,powershell脚本会运行,但它无法安装D。 为什么会这样

我怀疑windows不允许多个安装程序(我的MSI由wix生成,installer for D由powershell脚本执行)同时运行

如何避免呢

下面是我的product.wxs文件的一部分

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">

    <?define Manufacturer="DWJIDWJDJ"?>

    <Product Id="*" Name="JDCA" Language="1033" Version="0.0.0.0" Manufacturer="$(var.Manufacturer)" UpgradeCode="dad416b3-034d-49eb-9407-0b681e5108c3">
        <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />

        <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
        <MediaTemplate EmbedCab="yes" />

        <Property Id="ARPNOREPAIR" Value="yes" Secure="yes" />
        <Property Id="ARPNOMODIFY" Value="yes" Secure="yes" />

        <Feature Id="ProductFeature" Title="WDJNIDJDJW" Level="1">
            <ComponentGroupRef Id="InstallScriptsGroup" />
            <ComponentGroupRef Id="ResourcesGroup" />
        </Feature>

        <CustomAction Id="ComponentsInstallAction" Property="WixShellExecTarget" Directory="INSTALLFOLDER" ExeCommand ='"$(env.SystemRoot)\system32\WindowsPowerShell\v1.0\powershell.exe" -ExecutionPolicy Bypass -NonInteractive -NoProfile -Command ./MYSCRIPT.ps1' Execute="deferred" Impersonate="no" Return="check" />

        <InstallExecuteSequence>
            <Custom Before="InstallFinalize" Action="ComponentsInstallAction">Not Installed or REINSTALL</Custom>
        </InstallExecuteSequence>

    </Product>

    <Fragment>
        <Directory Id="TARGETDIR" Name="SourceDir">
            <Directory Id="CommonAppDataFolder">
                <Directory Id="IhmDir" Name="IHM">
                    <Directory Id="INSTALLFOLDER" Name="IhmZebraComponents" />
                </Directory>
            </Directory>
        </Directory>

        <ComponentGroup  Id="InstallScriptsGroup"  Directory="INSTALLFOLDER">
            <Component Id="ComponentsInstallerScript" Guid="72cef904-4426-470d-a2d0-9545d0127f0a">
                <File Id="ComponentsInstallerSscript" Source="MYSCRIPT.ps1" KeyPath="yes" Checksum="yes"/>
            </Component>
        </ComponentGroup>

        <ComponentGroup  Id="ResourcesGroup"  Directory="INSTALLFOLDER">

CONTINUED


提前感谢您的帮助

如果我们在异步模式下运行自定义操作,我们只能从wix工具集中的自定义操作安装其他安装程序

所以改变路线是可行的

<CustomAction Id="ComponentsInstallAction" Property="WixShellExecTarget" Directory="INSTALLFOLDER" ExeCommand ='"$(env.SystemRoot)\system32\WindowsPowerShell\v1.0\powershell.exe" -ExecutionPolicy Bypass -NonInteractive -NoProfile -Command ./MYSCRIPT.ps1' Execute="deferred" Impersonate="no" Return="check" />


我认为此时您应该重新评估如何安装相关应用程序。为了避免像这样的头痛,您是否考虑过使用WiX引导程序

WiX引导程序允许您嵌入/下载和安装相关应用程序,以及处理升级等。

<CustomAction Id="ComponentsInstallAction" Property="WixShellExecTarget" Directory="INSTALLFOLDER" ExeCommand ='"$(env.SystemRoot)\system32\WindowsPowerShell\v1.0\powershell.exe" -ExecutionPolicy Bypass -NonInteractive -NoProfile -Command ./MYSCRIPT.ps1' Execute="deferred" Impersonate="no" Return="check" />
<CustomAction Id="ComponentsInstallAction" Property="WixShellExecTarget" Directory="INSTALLFOLDER" ExeCommand ='"$(env.SystemRoot)\system32\WindowsPowerShell\v1.0\powershell.exe" -ExecutionPolicy Bypass -NonInteractive -NoProfile -Command ./MYSCRIPT.ps1' Execute="immediate" Impersonate="no" Return="asyncNoWait" />