Verify ActiveX presence and registration
By Sergey - Posted on May 16th, 2008
An ActiveX installation on PC can be verified by finding its ProgID from OleClass property in the registry.
| This is sample code. Add error handling and adjust to your requirements as necessary. |
? VerifyActiveX("MSWinsock.Winsock") ? VerifyActiveX("MSCAL.Calendar") ? VerifyActiveX("MSComCtl2.DTPicker") RETURN &&----------------------------------------- FUNCTION VerifyActiveX LPARAMETERS tcProgID #DEFINE HKEY_CLASSES_ROOT -2147483648 LOCAL loReg, lcActiveXFileName, lcCLSID, llOK loReg = NEWOBJECT("Registry", "registry.prg") && See if ProgID for ActiveX exists in the registry lcCLSID = loReg.ReadRegistryString(HKEY_CLASSES_ROOT, tcProgID + "\CLSID" , "") llOK = NOT ISNULL(lcCLSID) IF llOK && See if actual file implementing ActiveX is specified and exists lcActiveXFileName = loReg.ReadRegistryString(HKEY_CLASSES_ROOT, "CLSID\" + lcCLSID + "\InprocServer32" , "") llOK = NOT ISNULL(lcActiveXFileName) AND FILE(lcActiveXFileName) ENDIF RETURN llOK
The registry class can be downloaded from http://berezniker.com/files/registry.zip
Recent comments
1 week 19 hours ago
2 weeks 1 day ago
3 weeks 1 day ago
3 weeks 2 days ago
3 weeks 5 days ago
3 weeks 6 days ago
4 weeks 3 days ago
4 weeks 4 days ago
4 weeks 5 days ago
4 weeks 5 days ago