Script to find ProgID's Registered with the local COM server
Here's a script I wrote up quickly tonight that grabs all the registered COM objects with ProgID's and outputs it to comma-delimited text. Basically, what I do with it, since I was way too lazy (hey, I had other things going on too :-) to use a Scripting.FileSystemObject is to run it from the command line using cscript.exe and use the ">" to redirect to a file. Here's an example from the command line:
cscript findProgIDs.vbs > progIDs.csv
Then remove the first couple lines from the text document, and open the CSV file with OpenOffice Calc. Select columns A and B, goto Data --> Sort --> OK, and voila! You now have a list of COM objects, complete with both ProgID and VersionIndependentProgID pulled fresh from your local computer's registry! Now, as for what you can do with these, I have absolutely no idea, but this is at least a start :) Here's what I do: find something that sounds interesting that you'd want to script with (I chose Microsoft.Update.ServiceManager), goto Google, type in the name of the COM object, and see if anyone has examples or documentation on how to use it. Anyway, hopefully this helps someone out or puts some new ideas in someone's mind .... just throwing it out there for fun. You never know what you can find ... maybe even a script that prints out a PDF document without taking the steps of opening it up and choosing print? Until next time ...
EDIT: Here's a link I found to some documentation on using the Windows Update API
on error resume next
subkey = "CLSID"
const HKEY_CLASSES_ROOT = 2147483648
set objWMI = GetObject("winmgmts:root\default:StdRegProv")
objWMI.EnumKey HKEY_CLASSES_ROOT, subkey, keys
for each key in keys
skey = subkey & "\" & key & "\ProgID"
svkey = subkey & "\" & key & "\VersionIndependentProgID"
objWMI.GetStringValue HKEY_CLASSES_ROOT, skey, "", ProgID
objWMI.GetStringValue HKEY_CLASSES_ROOT, svkey, "", IProgID
if ProgID <> "" and IProgID = "" then
elseif ProgID <> "" and IProgID <> "" then
wscript.echo ProgID & "," & IProgID
My life of learning various things about technology including network administration, development, and 3D design