类似rpm包管理器的Windows Installer PowerShell Module简介
一、windows installer powershell module简介
windows installer powershell module是一个开源项目,存放在微软的开源项目网站codeplex上,下面是其主页上项目描述。
project description
exposes windows installer functionality to powershell, providing means to query installed product and patch information and to query views on packages.
powershell is a powerful command shell that pipes objects - not just text. because of this ability, you can string practically unrelated commands together in many different ways to work on different types of objects, all built on .net. you can use all the properties and methods of those objects passed through the pipeline instead of being limited by the text sent to you as with traditional command shells.
this windows installer module for powershell provides cmdlets ("command-lets") - similar to functions - to query package states, patches registered and applied to products, and more. you can use it to query windows installer products and patches installed on your system.
get-msiproductinfo | where { $_.name -like '*visual studio*' }
you can even use it to determine which products installed a particular file on your system.
get-msicomponentinfo `
| where { $_.path -like 'c:\program files\*\common7\ide\devenv.exe'} `
| get-msiproductinfo
and with new cmdlets in 2.2.0 you can also install, repair, and uninstall products and patches complete with progress information, and warnings and errors direct to the pipeline.
install-msiproduct .\example.msi -destination (join-path $env:programfiles example)
you can find more examples and usage in the documentation.
二、windows installer powershell module主要功能:
1.查询系统已经安装的产品和补丁
2.查询源安装包信息
3.安装,修复和卸载产品和补丁
4.验证产品和补丁
下载与详细文档,可以参考项目主页:
上一篇: vue异步加载高德地图的实现