(view source code of progids.vbs as plain text)
Option Explicit
Const HKEY_CLASSES_ROOT = &H80000000
Dim arrProgID, lstProgID, objReg, strMsg, strProgID, strSubKey, subKey, subKeys()
If WScript.Arguments.Count > 0 Then
strMsg = "ProgIDs.vbs, Version 1.00" & vbCrLf _
& "List all ProgIDs available on the local computer" & vbCrLf & vbCrLf _
& "Based on a PowerShell script on www.readify.net" & vbCrLf & vbCrLf _
& "Usage: " & WScript.ScriptName & vbCrLf & vbCrLf _
& "Written by Rob van der Woude" & vbCrLf _
& "http://www.robvanderwoude.com"
WScript.Echo strMsg
End If
Set lstProgID = CreateObject( "System.Collections.ArrayList" )
Set objReg = GetObject( "winmgmts://./root/default:StdRegProv" )
' List all subkeys of HKEY_CLASSES_ROOT\CLSID
objReg.EnumKey HKEY_CLASSES_ROOT, "CLSID", subKeys
' Loop through the list of subkeys
For Each subKey In subKeys
' Check each subkey for the existence of a ProgID
strSubKey = "CLSID\" & subKey & "\ProgID"
objReg.GetStringValue HKEY_CLASSES_ROOT, strSubKey, "", strProgID
' If a ProgID exists, add it to the list
If Not IsNull( strProgID ) Then lstProgID.Add strProgID
Next
' Sort the list of ProgIDs
lstProgID.Sort
' Copy the list to an array (this makes displaying it much easier)
arrProgID = lstProgID.ToArray
' Display the entire array
WScript.Echo Join( arrProgID, vbCrLf )
page last modified: 2024-04-16; loaded in 0.0050 seconds