问题描述
我的 Powershell 脚本中相当简单的一行来运行安装。该线路工作 - 安装程序出现并成功完成。然而这个错误仍然存在。
start-process -Wait (msiexec.exe /I “C:\Temp\MBAM 2.5\Installers\x64\MBAMClient.msi”)
错误:
start-process : A positional parameter cannot be found that accepts argument ‘C:\Temp\MBAM 2.5\Installers\x64\MBAMClient.msi’
At line:1 char:1
即使它有效,重要的是不要在我的控制台中出现错误,这不仅是出于明显的原因,也是为了获得批准。
解决方法
我通过将命令简化为:
‘Start-Process -Wait ‘C:\Temp\MBAM 2.5\Installers\x64\MBAMClient.msi’‘
这就是全部。安装,等待,没有错误。