广州明生堂生物科技有限公司


类似rpm包管理器的Windows Installer PowerShell Module简介

网络编程 类似rpm包管理器的Windows Installer PowerShell Module简介 06-21

一、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*Common7IDEdevenv.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.验证产品和补丁

下载与详细文档,可以参考项目主页:http://psmsi.codeplex.com/

PowerShell远程安装MSI安装包、EXE可执行程序的方法
尽管对IT管理员或者开发者来讲,这是一个很常见的任务,但是在网上能找到远程安装一个msi包或者exe应用程序的相关文档还是比较少的。甚至有人在一

Powershell从注册表中查询默认MAPI客户端的例子
当你通过类似Mailto:链接发送邮件,此时邮件客户端就是MAPI客户端。如果要找出到这个MAPI客户端在哪里,这里有个函数能从注册表中获得该信息。functi

Powershell中调用邮件客户端发送邮件的例子
你可以使用Send-MailMessage发送邮件,但是你想从你默认MAPI客户端准备发送一份邮件,这也不是很麻烦:$subject='SendingviaMAPIclient'$body='MyMessage'$to='tobias@powert


编辑:广州明生堂生物科技有限公司

标签:客户端,项目,发送邮件,邮件,注册表