找回密码
 新建账号

.msi Cannot run a document in the middle of a pipeline

[复制链接]
蔡徐坤 发表于 2023/12/13 18:15 | 显示全部楼层 |阅读模式
在远端电脑上在 Powershell 中直接运行 .msi 文件,报了一个 Cannot run a document in the middle of a pipeline 错误,调用 msiexec.exe 来安装 .msi 又报了一个 This installation package could not be opened.  Verify that the package exists and that you can access it, or contact the application vendor to verify that this is a valid Windows Installer package.
  1. .\rewrite.msi /passive
复制代码
Cannot run a document in the middle of a pipeline: path\to\rewrite.msi
  1. msiexec.exe /package .\rewrite.msi /passive
复制代码
This installation package could not be opened.  Verify that the package exists and that you can access it, or contact the application vendor to verify that this is a valid Windows Installer package.
经过一翻研究发现把相对路径换成绝对路径或者去掉.\可以解决问题,也就是按下面这两种方式调用 msiexec.exe 安装 .msi 文件。
  1. msiexec.exe /package C:\Users\Wuxiancheng\Downloads\rewrite.msi /passive
复制代码
  1. msiexec.exe /package rewrite.msi /passive
复制代码
参考链接:msiexec

手机版|轻松E站

GMT+8, 2024/12/21 21:03

快速回复 返回顶部 返回列表