How to find a DLL given a CLSID?

柔情痞子 提交于 2019-11-29 02:54:11

Normaly, you can just go to:

HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\"GUID"

And find a key called "InProcServer32" for instance and there will be the default value that has the DLL. This is one simple way to do it.

Can you not just search for it in the registry using regedit and look for the binary path.

Based on BobbyShaftoe reply we can build a simple vbs script that reads that registry for us:

Dll_RegPath = "HKEY_CLASSES_ROOT\CLSID\<GUID>\InProcServer32\"

Paste the following to "test.vbs"

Sub Main

    ' used to find location of "System.Collections.ArrayList" progid dll
    Const csGUID = "{6896B49D-7AFB-34DC-934E-5ADD38EEEE39}"

    MsgBox srGetDllPathByGUID(csGUID)

End Sub

Function srGetDllPathByGUID( sGUID )
    Const csRegPath = "HKEY_CLASSES_ROOT\CLSID\<GUID>\InProcServer32\"

    Dim oShell: Set oShell = CreateObject("WScript.Shell")
    Dim sReg: sReg = Replace( csRegPath, "<GUID>", sGUID ) ' build str

    srGetDllPathByGUID = oShell.RegRead(sReg)

    Set oShell = Nothing ' clean up
End Function

Call Main

You can also find ProgId by:

ProgID_RegPath = "HKEY_CLASSES_ROOT\CLSID\<GUID>\ProgID\"
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!