Ask:
Hey, scripting guy!. Is there an easy way to find out which programs have been downloaded for Internet Explorer (these items are in the folder C:\Windows\Downloaded program Files)? I can use a script to get executable file names and dependencies, but I want to get the names of the files they appear in the folder.
--AC
For:
Hello, AC. When you download an ActiveX control or a Java applet, these items are usually placed in the Downloaded program folder. You can view these items in Windows Explorer or from Internet Explorer. (Click Internet Options, and then on the General tab, click Settings.) In the Settings dialog box, click View Objects. )
When you use Windows Explorer to view folder contents, you see friendly names such as MSN File Upload control. However, if you use the dir command or use a script such as FileSystemObject to access this folder, you will see an executable file name such as "Msnupld.cab". You want to be able to use scripts to return these friendly names that you see in Windows Explorer.
So what are you going to do about it? Of course, you can use the following script:
Copy Code code as follows:
strcomputer = "."
Set objwmiservice = getobject ("winmgmts:\\" & strComputer & _
"\root\cimv2\applications\microsoftie")
set coliesettings = objwmiservice.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 relies on the class MicrosoftIE_Object and namespace root\cimv2\Applications\MicrosoftIE, and as far as we know, this class and this namespace are not yet proven. However, it seems that this script can be used; If you run this script, 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" property gives you the same friendly name as it appears in the "Downloaded Programs" folder.