description
returns a list of software that was installed on a computer using windows installer. this information is then written to a text file. script code
复制代码 代码如下:
var wbemflagreturnimmediately = 0x10;
var wbemflagforwardonly = 0x20;
var objwmiservice = getobject(winmgmts:\\\\.\\root\\cimv2);
var colitems = objwmiservice.execquery(select * from win32_product, wql,
wbemflagreturnimmediately | wbemflagforwardonly);
var enumitems = new enumerator(colitems);
for (; !enumitems.atend(); enumitems.movenext()) {
var objitem = enumitems.item();
wscript.echo(caption: + objitem.caption);
wscript.echo(description: + objitem.description);
wscript.echo(identifying number: + objitem.identifyingnumber);
wscript.echo(install date: + objitem.installdate);
wscript.echo(install date 2: + objitem.installdate2);
wscript.echo(install location: + objitem.installlocation);
wscript.echo(install state: + objitem.installstate);
wscript.echo(name: + objitem.name);
wscript.echo(package cache: + objitem.packagecache);
wscript.echo(sku number: + objitem.skunumber);
wscript.echo(vendor: + objitem.vendor);
wscript.echo(version: + objitem.version);
wscript.echo();
}