Use vbs to return the download control and Applet list of Internet Explorer.

Source: Internet
Author: User

Q:
Hi, Scripting Guy! Is there a simple way to find out which programs have been Downloaded for Internet Explorer (these projects are in the C: \ Windows \ Downloaded Program Files Folder )? I can use a script to get executable and dependent files, but I want to get the names of them displayed in the folder.

-- AC

A:
Hello, AC. When you Download ActiveX controls or Java applets, these items are usually placed in the "Downloaded Program" folder. You can view these projects in Windows Explorer or from Internet Explorer. (Click "Internet Options", and then click "Settings" on the "General" tab ". In the "Settings" dialog box, click "view object ".)

When you use Windows Resource Manager to view the folder content, you will see a friendly name such as "MSN File Upload Control. However, if you use the dir command or scripts such as FileSystemObject to access this folder, you will see executable file names such as "MsnUpld. cab. You want to use the script to return the friendly names you see in Windows Resource Manager.

So what do you do? Of course, you can use the following script:

Copy codeThe Code is as follows: strComputer = "."
Set ob1_miservice = GetObject ("winmgmts: \" & strComputer &_
"\ Root \ cimv2 \ Applications \ MicrosoftIE ")

Set colIESettings = obw.miservice. ExecQuery _
("Select * from MicrosoftIE_Object ")

For Each strIESetting in colIESettings
Wscript. Echo "Code base:" & strIESetting. CodeBase
Wscript. Echo "Program file:" & strIESetting. ProgramFile
Wscript. Echo "Status:" & strIESetting. Status
Wscript. Echo
Next

This script depends on the MicrosoftIE_Object class and the namespace root \ cimv2 \ Applications \ MicrosoftIE. As far as we know, this class and the namespace have not been proved. However, it seems that this script can be used. Run this script and you will get output similar to the following:

Code base: http:// SC .groups.msn.com/controls/FileUC/MsnUpld.cab
Program file: MSN File Upload Control
Status: Installed

As you can see, the "ProgramFile" attribute provides you with the same friendly name as shown in the "Downloaded Programs" folder.

Related Article

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.