Solved

Locate Internet Explorer 'Downloaded Program Files' Folder

Posted on 2006-06-29
6
1,101 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
ScreenConnect 6.0 Free Trial

At ScreenConnect, partner feedback doesn't fall on deaf ears. We collected partner suggestions off of their virtual wish list and transformed them into one game-changing release: ScreenConnect 6.0. Explore all of the extras and enhancements for yourself!

 
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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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 Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

822 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