【问题标题】:Calling a powershell script from InstallShield project从 InstallShield 项目调用 powershell 脚本
【发布时间】:2017-09-11 16:33:50
【问题描述】:

我遇到了一个奇怪的问题。

我有一个 InstallShield 项目(它创建 setup.exe),其中包含一个自定义操作项 - 调用一个 powershell 脚本。

脚本所做的只是在已安装的 Adob​​e Reader 11.0.0 之上安装 3 个 adobe reader 更新(1 个 exe 文件和 2 个 msp 文件)。

当我自己调用脚本时 - 它工作正常。

然而,在 setup.exe 完成后,似乎只安装了一个更新(exe 文件)(安装后的 adobe reader 版本是 11.00.10,这是只运行 exe 文件的结果。. )。

所有 3 个 adobe 更新都位于同一个文件夹中,powershell 脚本首先将其位置设置为该文件夹。 在安装后手动运行更新时 - 它也可以正常工作并将其更新到 10.00.22(应该是什么)。

任何想法为什么会发生这种情况?

这是我的 powershell 脚本:

    Set-Location  "C:\myProject\adobeUpdates"

Start-Process .\AdbeRdr11010_en_US.exe -ArgumentList '/q /norestart /sPB /rs /msi' -WindowStyle hidden -Wait

ping 1.1.1.1 -n 1 -w 10000  # Tried to add a delay but wasn't helpful

Start-Process -FilePath “AdbeRdrUpd11021.msp” -ArgumentList '/qn' -Wait

Start-Process -FilePath “AdbeRdrUpd11022_incr.msp” -ArgumentList '/qn' -Wait

非常感谢

【问题讨论】:

  • 能否在参数中添加日志开关? '/L*V "C:\temp\patch.log"' 之类的东西 认为这可能会为您提供更多关于为什么这些更新没有安装的信息。
  • powershell 顺便让你做Start-Sleep -Seconds 10
  • 在调用“.msp”文件时不应该添加“/update”标志吗?

标签: powershell windows-installer installshield


【解决方案1】:

解决了,这是工作脚本:

 Set-Location  "C:\myProject\adobeUpdates"

Start-Process .\AdbeRdr11010_en_US.exe -ArgumentList '/q /norestart /sPB /rs /msi' -WindowStyle hidden -Wait

ping 1.1.1.1 -n 1 -w 10000

Start-Process .\AdbeRdrUpd11021.msp -ArgumentList '/qn' -Wait

Start-Process .\AdbeRdrUpd11022_incr.msp -ArgumentList '/qn' -Wait

我不确定有什么不同,我希望有人能解释一下,但无论如何它现在工作得很好。

【讨论】:

    猜你喜欢
    • 2015-07-07
    • 2016-06-22
    • 1970-01-01
    • 2011-10-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多