Check
How to register/unregister an OCX/ActiveX programatically FAQ #7699
BTW, it's not a good idea to unconditionally copy an ActiveX control in the system folder. The PC could have newer/different version installed already.
>How to registered dll in vfp, i am getting a error in line 4
>
LOCAL lcfile,lcfile2,lctragetfile
>lcfile="MSCOMM32.OCX"
>lcfile2="MSCOMM32.OCX"
>COPY FILE (lcfile2) TO (GETENV("windir")+"\system"
>lcregthis="regsvr32.exe MSCOMM32.OCX"
>RUN/n1 &lcregthis /s
>CLEAR TYPEAHEAD
--sb--