Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Searching for ActiveX Controls in a client computer

Status
Not open for further replies.
Sep 29, 2002
524
US
Hello,

I am trying to write a script that outputs the files under the C:\Windows\Downloaded Porgram Files but I have not been able to figure out how to get the CLSID property for each file. Does any one has any idea?

Here is the code I have so far
Code:
Const ForReading = 1, ForWriting = 2

Dim fso, Myfile
Set fso = CreateObject("Scripting.FileSystemObject")

' Open the file for write access.
On Error Resume Next
Set MyFile = fso.OpenTextFile("c:\temp\testfile.txt", ForWriting, True, OpenAsASCII)

Set Appshell = WScript.CreateObject("Shell.Application")
Set folder = Appshell.NameSpace("C:\Windows\Downloaded Program Files")

Set items = folder.Items

For Each item in items
  if item.path <> "" then 
	version = fso.getfileversion(item.path)
  end if
  Myfile.Write item.name & vbTab & version & vbCrLf
Next

objFile.Close

NEXT

Thanks in advanced,


Gladys Rodriguez
GlobalStrata Solutions
Computer Repair, Website Design and Computer Consultant
Small Business Resources
Anime, Manga and Video Games
 
You would need to get that information from the registry instead of the file system.

Note: There is a script to report installed ActiveX Controls at


I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top