PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → [WD18] ACTIVEX REGISTER
[WD18] ACTIVEX REGISTER
Iniciado por guest, 18,mar. 2015 21:27 - 2 respuestas
Publicado el 18,marzo 2015 - 21:27
hello,

When creating my installation, is there a way to automatically register my ActiveX components I have used. I added them to the 'files installed' list but that didn't work.

Thanks

ISO
Publicado el 19,marzo 2015 - 13:32
Hi iso,

As far as I know it is not possible. You must handle that yourself. We made a small function that does just that in a personalized version of WDSETUP.

This is quite simple to do in WinDev:

API(sFilename, bRegister ? "DllRegisterServer" ELSE "DllUnregisterServer")
This does the job. We made the thing a bit more complex to check if it is necessary or not to register the DLL/OCX and if it succeeded, using the CLSID and checking the registry before and after.

With this line of code you can check before (un)registering if it is really required and also after to know if the job has been done properly and return True or False and error codes based on that.

bRegistered = RegistryExist("HKEY_CLASSES_ROOT\CLSID\"+["{"]+sCLSID+["}"])
Best regards,
Alexandre Leclerc
Publicado el 20,marzo 2015 - 15:04
HI,

Just remember you install must probably run as an "administrator", as I think this triggers UAC.

Also a "in admin mode" cmd file can du this using regsvr32 myOcx.ocx add a /U for un-register

Cheers
Tor-Bjarne