这是我必须安装MSI的powershell脚本的一部分。我刚给了一个补丁(MSP),我不知道如何用这个MSI安装补丁(MSP)?任何帮助都会很棒!
Execute-MSI -Action Install –Path 'IRDesktop.msi' -Parameters "/QN"
答案 0 :(得分:0)
Downloading/unpacking pip from https://pypi.python.org/packages/b6/ac/7015eb97dc749283ffdec1c3a88ddb8ae03b8fad0f0e611408f196358da3/pip-9.0.1-py2.py3-none-any.whl#md5=297dbd16ef53bcef0447d245815f5144
Downloading pip-9.0.1-py2.py3-none-any.whl (1.3MB): 1.3MB downloaded
Downloading/unpacking setuptools from https://pypi.python.org/packages/43/41/033a273f9a25cb63050a390ee8397acbc7eae2159195d85f06f17e7be45a/setuptools-38.5.1-py2.py3-none-any.whl#md5=908b8b5e50bf429e520b2b5fa1b350e5
Downloading setuptools-38.5.1-py2.py3-none-any.whl (489kB): 489kB downloaded
Requirement already up-to-date: wheel in /usr/local/lib/python3.4/dist-packages
Installing collected packages: pip, setuptools
Found existing installation: pip 1.5.4
Not uninstalling pip at /usr/lib/python3/dist-packages, owned by OS
Can't roll back pip; was not uninstalled
Cleaning up...
Exception:
Traceback (most recent call last):
File "/usr/lib/python3.4/shutil.py", line 523, in move
os.rename(src, real_dst)
PermissionError: [Errno 13] Permission denied: '/tmp/pip_build_martin/pip/pip-9.0.1.dist-info/WHEEL' -> '/usr/local/lib/python3.4/dist-packages/pip-9.0.1.dist-info/WHEEL'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/usr/lib/python3/dist-packages/pip/commands/install.py", line 283, in run
requirement_set.install(install_options, global_options, root=options.root_path)
File "/usr/lib/python3/dist-packages/pip/req.py", line 1436, in install
requirement.install(install_options, global_options, *args, **kwargs)
File "/usr/lib/python3/dist-packages/pip/req.py", line 672, in install
self.move_wheel_files(self.source_dir, root=root)
File "/usr/lib/python3/dist-packages/pip/req.py", line 902, in move_wheel_files
pycompile=self.pycompile,
File "/usr/lib/python3/dist-packages/pip/wheel.py", line 206, in move_wheel_files
clobber(source, lib_dir, True)
File "/usr/lib/python3/dist-packages/pip/wheel.py", line 200, in clobber
shutil.move(srcfile, destfile)
File "/usr/lib/python3.4/shutil.py", line 535, in move
copy2(src, real_dst)
File "/usr/lib/python3.4/shutil.py", line 245, in copy2
copyfile(src, dst, follow_symlinks=follow_symlinks)
File "/usr/lib/python3.4/shutil.py", line 109, in copyfile
with open(dst, 'wb') as fdst:
PermissionError: [Errno 13] Permission denied: '/usr/local/lib/python3.4/dist-packages/pip-9.0.1.dist-info/WHEEL'
Storing debug log for failure in /home/martin/.pip/pip.log
是Execute-MSI
的一部分。 PSAppDeplyomentKit
还具有MSP文件的函数PSAppDeploymentKit
。
在MSP文件中读取SummaryInfo目标产品代码,并确定MSP文件是否适用于任何已安装的产品 如果找到有效的已安装产品,则触发Execute-MSI功能以修补安装。
实施例
Execute-MSP
如果您想明确使用Execute-MSP -Path 'Adobe_Reader_11.0.3_EN.msp'
,请将Execute-MSI
从Action
更改为Install
以获取MSP文件。
示例
Patch