Puedes registrar el OCX desde tu propio programa...
Código:
uses ShellApi
(...)
procedure RegistrarOCX;
type TRegFunc = function : HResult; stdcall;
var tmpHandle: tHandle;
tmpRegFunc : TRegFunc;
tmpRutaOCX: String;
begin
tmpRutaOCX := 'C:\Una ruta cualquiera\SWF.ocx';
tmpHandle := LoadLibrary(pAnsiChar(tmpRutaOCX));
if ( tmpHandle <> 0 ) then
begin
tmpRegFunc := GetProcAddress( tmpHandle, 'DllRegisterServer' );
if Assigned( tmpRegFunc ) then
begin
Ejecutar_Y_Esperar('regsvr32.exe', '/s ' + ExtractShortPathName(tmpRutaOCX));
end;
FreeLibrary(tmpHandle);
end;
end;
function Ejecutar_Y_Esperar(const ExecuteFile, ParamString : string): boolean;
var
SEInfo: TShellExecuteInfo;
ExitCode: DWORD;
begin
FillChar(SEInfo, SizeOf(SEInfo), 0);
SEInfo.cbSize := SizeOf(TShellExecuteInfo);
with SEInfo do begin
fMask := SEE_MASK_NOCLOSEPROCESS;
Wnd := Application.Handle;
lpFile := PChar(ExecuteFile);
lpParameters := PChar(ParamString);
nShow := SW_HIDE;
end;
if ShellExecuteEx(@SEInfo) then
begin
repeat
Application.ProcessMessages;
GetExitCodeProcess(SEInfo.hProcess, ExitCode);
until (ExitCode <> STILL_ACTIVE) or Application.Terminated;
Result:=True;
end
else Result:=False;
end;
Sacado de
http://delphi.about.com/od/windowssh.../aa040803a.htm
En principio el código valdria para registrar cualquier control OCX cambiando el valor de tmpRutaOCX.
Salu2.