It's not ugly at all. In fact it's quite nice and easy. Anyway, much more safe than looking for and using REGSVR32. See my FAQ on registering ActiveX controls programatically for details.
Vlad
>Good luck. There's an API available to do this, but it's quite ugly and complex. I'd recommend using REGSVR32, which can be fired silently in the background quite easily:
>
>(1) Locate REGSVR32.EXE; if it's somewhere in your WIndows path, you can reference it as REGSVR32, otherwise, save the full path.
>
>(2) Change directories to the location that holds the .DLL using the VFP CD/SET DEFAULT TO command. This is desirable so that if the self-registration code relies on the registration taking place in the home directory the paths will be properly recorded.
>
>(3) Execute the following command:
>
> RUN /N
REGSVR32 /S
>
>VFP does not wait for REGSVR32 to complete execution before continuing, and REGSVR32 will not display a messagebox unless the registration fails.