Solved

Locate Internet Explorer 'Downloaded Program Files' Folder

Posted on 2006-06-29
6
1,100 Views
Last Modified: 2010-05-19
Experts,

Requirement as follows:

1) Get path to the 'Downloaded Program Files' folder on a user's PC (the one that shows when you go Control Panel>Internet Options>Internet Properties>General>Temporary Internet Files>Settings>View Objects)
2) Plonk the files in this folder into a listbox along with their 'Status' attribute (happy to use FSO, if it can fetch that attribute)

The reason I'd like to do this, is for the purpose of an auto-purge routine that every so often reads the files in the folder and if the 'Status' of the file is 'damaged', deletes it.

Looking forward to your suggestions.

Regards,
DocNash
0
Comment
Question by:DoctorNash
  • 3
  • 3
6 Comments
 
LVL 76

Expert Comment

by:David Lee
ID: 17021081
You can use RegRead (http://www.devguru.com/Technologies/wsh/quickref/wshshell_RegRead.html) to read the value from the registry.  It appears to be stored here: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\ActiveX Cache\0
0
 

Author Comment

by:DoctorNash
ID: 17022092
BlueDevilFan's response answers Part 1 of the question - identifying location of Downloaded Program Files folder. How about Part 2 - reading the 'Status' of the ActiveX components listed in that folder (the different 'Statuses' being 'Installed', 'Unplugged' or 'Damaged')?
0
 

Author Comment

by:DoctorNash
ID: 17023575
Experts,

No takers for part 2??? Pls Check out this link for precisely what I'm after for part 2:

http://www.microsoft.com/technet/archive/ie/reskit/ie4/Part6/part6b.mspx?mfr=true

I'd like to programmatically access the Status property of the ActiveX controls listed in the C:\Windows\Downloaded Program Files folder. The 3 values of the Status property are:
-Installed (means control is installed correctly)
-Unplugged (means that an installation program has registered the ocx file in a location different from where the code download installed it)
-Damaged (means one or more of the dependency files of the control has been deleted)

No magic APIs for this?

0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 76

Accepted Solution

by:
David Lee earned 100 total points
ID: 17028318
Try this sample code from http://blogs.msdn.com/gstemp/.  It's toward the bottom of the page.

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
0
 

Author Comment

by:DoctorNash
ID: 17045568
That did the trick - thanks!
0
 
LVL 76

Expert Comment

by:David Lee
ID: 17046322
You're welcome.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now