Use JScript List Installed Software

Source: Internet
Author: User

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 ();
}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.