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.