?
Solved

Locate Internet Explorer 'Downloaded Program Files' Folder

Posted on 2006-06-29
6
Medium Priority
?
1,109 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 76

Accepted Solution

by:
David Lee earned 400 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

771 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