Solved

Locate Internet Explorer 'Downloaded Program Files' Folder

Posted on 2006-06-29
6
1,104 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
SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

 
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…

705 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