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
CopyCode Code: var wbemflagreturnimmediately = 0x10;
VaR wbemflagforwardonly = 0x20;
VaR ob1_miservice = GetObject ("winmgmts: \\\\\. \ Root \ cimv2 ");
VaR colitems = obw.miservice. 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 ();
}