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

Javascript
Javascript常用运算符(Operators)-javascript基础教程
JS是否可以跨文件同时控制多个iframe页面的应用技巧
不用ajax实现点击文字即可编辑的方法
用javascript来实现动画导航效果的代码
javascript支持firefox,ie7页面布局拖拽效果代码
IE与Firefox下javascript getyear年份的兼容性写法
javascript 不让鼠标事件触发
一个简单横向javascript日期控件
使Ext的Template可以解析二层的json数据的方法
表单项的name命名为submit、reset引起的问题
可以显示单图片,多图片ajax请求的ThickBox3.1类下载
两个DIV等高的JS的实现代码
支持IE和firefox的js代码美化加亮源码
2007/12/23更新创意无限,简单实用(javascript log)
DOMAssitant最新版 DOMAssistant 2.5发布
用js实现的页面关键字密度查询代码
Javascript函数加壳多用于事件绑定
收集的几个不错的javascript类小例子
javascript下function声明一些小结
JS的replace方法与正则表达式结合应用讲解

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


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-09-12   浏览: 157 ::
收藏到网摘: 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
}