Solved

Locate Internet Explorer 'Downloaded Program Files' Folder

Posted on 2006-06-29
6
1,099 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 76

Accepted Solution

by:
David Lee earned 100 total points
Comment Utility
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
Comment Utility
That did the trick - thanks!
0
 
LVL 76

Expert Comment

by:David Lee
Comment Utility
You're welcome.
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
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…

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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now