当前位置: 首页 > 图文教程 > 网络编程 > Javascript > 用jscript实现列出安装的软件列表

Javascript
innertext , insertadjacentelement , insertadjacenthtml , insertadjacenttext 等区别
JavaScript与C# Windows应用程序交互方法
javascript之解决IE下不渲染的bug
javascript之锁定表格栏位
javascript实现鼠标选取拖动或Ctrl选取拖动
优化网页之快速的呈现我们的网页
javascritp实现input输入框相关限制用法
用javascript实现的激活输入框后隐藏初始内容
CSS代码格式化和压缩的方法与技巧
autocomplete禁止自动完成功能
IE autocomplete internet explorer''s autocomplete
如何快速的呈现我们的网页的技巧整理
计算黄金分割的javascript代码
设置和读取cookie的javascript代码
javascript 复选框选择/全选后特效
实现一个年、月、季度联动SELECT的javascript代码
javascript事件模型代码
WordPress 插件——CoolCode使用方法与下载
用javascript实现画图效果的代码
javascript发表评论或者留言时的展开效果

Javascript 中的 用jscript实现列出安装的软件列表


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-09-12   浏览: 71 ::
收藏到网摘: n/a

Returns a list of software that was installed on a computer
using Windows Installer. This information is then
written to a text file. This script requires both Windows
PowerShell and the corresponding version of
the .NET Framework. For more information on downloading
these items see the Windows PowerShell download page (right).
复制代码 代码如下:

$strComputer = "."
$colItems = get-wmiobject -class "Win32_Product" -namespace "root\CIMV2" `
-computername $strComputer
foreach ($objItem in $colItems) {
write-host "Caption: " $objItem.Caption
write-host "Description: " $objItem.Description
write-host "Identifying Number: " $objItem.IdentifyingNumber
write-host "Installation Date: " $objItem.InstallDate
write-host "Installation Date 2: " $objItem.InstallDate2
write-host "Installation Location: " $objItem.InstallLocation
write-host "Installation State: " $objItem.InstallState
write-host "Name: " $objItem.Name
write-host "Package Cache: " $objItem.PackageCache
write-host "SKU Number: " $objItem.SKUNumber
write-host "Vendor: " $objItem.Vendor
write-host "Version: " $objItem.Version
write-host
}