ESPAÑOL
ActiveGantt Gantt Chart / Scheduler Components for Windows Forms, ASP.NET, WPF, Silverlight and ActiveX enabled development systems. Visual Basic.NET, C# and C++.
A free Graphical User Interface for the Regsvr32 utility.
Friday, December 5, 2014

Download: Regsvr32UI.zip File Containing Regsvr32UI.exe

Download: ZIP File Containing the Regsvr32UI.exe Source Code

When developing ActiveX controls we often find that we leave a myriad of registered controls that clutter our system. Some even have the same name but have different GUID and Dispatch ID's and so forth. In almost all ActiveX containers, when inserting these controls it is almost impossible to distinguish between the two, or three or four different versions.

So we have developed this small application that can help you avoid the command line interface for Regsvr32.exe. You can register and unregister controls and also have a list of all of the controls installed in your system at any given time.

Regsvr32UI.exe a free graphical interface for regsvr32.exe

This application is written in Visual C++ 2002 in MFC, and therefore does not need any runtime files and can be used in most computers just by copying the exe file.

Using this code the application gives you a list of all installed ActiveX controls on your system.

void CRegsvr32UIDlg::RefreshList(void)
{
    CoInitialize (NULL);
    ICatInformation *pCatInfo=NULL;
    HRESULT hr=CoCreateInstance (CLSID_StdComponentCategoriesMgr ,NULL,CLSCTX_INPROC_SERVER,IID_ICatInformation ,(void **)&pCatInfo);
    pCatInfo->AddRef ();
    IEnumGUID *pEnumGUID=NULL;
    CATID pcatidImpl[1];
    CATID pcatidReqd[1];
    pcatidImpl[0]=CATID_Control;
    pCatInfo->EnumClassesOfCategories (1,pcatidImpl,0,pcatidReqd ,&pEnumGUID);
    CLSID clsid;
    int i = 0;
    while( (hr= pEnumGUID->Next( 1, &clsid, NULL ))==S_OK )
    {
        BSTR bstrClassName;
        OleRegGetUserType (clsid,USERCLASSTYPE_FULL,&bstrClassName);
        CString strControlName(bstrClassName);
        LPOLESTR className;
        hr = StringFromCLSID(clsid, &className);
        CString sCLSID = className;
        CoTaskMemFree(className);
        CString sPath = "";
        HKEY hKey;
        if (RegOpenKeyEx(HKEY_CLASSES_ROOT, _T("CLSID\\" + sCLSID + "\\InprocServer32"), 0, KEY_QUERY_VALUE, &hKey) == ERROR_SUCCESS)
        {
                TCHAR strValue[255] = _T("");
                DWORD dwBufLen = 255;
                RegQueryValueEx(hKey, NULL, NULL, NULL, (LPBYTE) strValue, &dwBufLen);
                RegCloseKey(hKey);
                TCHAR strLongPath[1500] = _T("");
                dwBufLen = 1500;
                GetLongPathName(strValue, strLongPath, dwBufLen);
                sPath = strLongPath;
        }
        LVITEM lvi;
        lvi.mask = LVIF_TEXT;
        lvi.iItem = i;
        lvi.iSubItem = 0;
        lvi.pszText = (LPTSTR)(LPCTSTR)strControlName;
        int j;
        j = m_list2.InsertItem(&lvi);
        lvi.iItem = j;
        lvi.iSubItem = 1;
        lvi.pszText = (LPTSTR)(LPCTSTR)sPath;
        m_list2.SetItem(&lvi);
        i = i + 1;
    }    
    pCatInfo->Release ();
    CoUninitialize ();
}

It also presents you with complete path of the ActiveX control inside your system.

In Windows Vista, Windows 7 Windows Server 2008, Windows 8 and Windows Server 2012 Regsvr32UI.exe must be run as an administrator.

All trademarks remain property of their respective holders, and are used only to directly describe the products and services being provided. Their use in no way indicates any relationship between Boötes Systems SAS and the holders of said trademarks.