搜索了很多资料,照着做还是不能解决,麻烦知道的兄弟告诉一声。如果安装需要什么文件,请提供网址或发往[email protected]

解决方案 »

  1.   

    分发 VCF132.OCX,MFCANS32.DLL , OC30.DLL 几个动态连接库,把他们放在可执行文件相同的目录下,或者放在system目录下!
    写到工程文件里
    uses Registry,Windows,SysUtils,ShellAPI
    var reg:TRegistry;
        SystemPath:array [0..256] of char; function FileCopy({handle:HWND;}Source, Dest: string): boolean;
     var temp:_SHFILEOPSTRUCT;
        FromBuff,ToBuff:array [0..4056] of char;
     begin
      try
        temp.Wnd:=0;
        FillChar(FromBuff,SizeOf(FromBuff),0);
        StrPCopy(FromBuff,PChar(Source));
        temp.pFrom:=@FromBuff;
        FillChar(ToBuff,SizeOf(ToBuff),0);
        StrPCopy(toBuff,PChar(Dest));
        temp.pTo:=@ToBuff;
        temp.wFunc:=FO_Copy;
        temp.fFlags:=FOF_ALLOWUNDO+FOF_MULTIDESTFILES;
        if SHFileOperation(temp)=0 then result:=true else result:=false;
      except
        result:=false;
      end;
     end;begin
      Application.Initialize;
      reg:=TRegistry.Create;
      GetSystemDirectory(SystemPath,sizeof(SystemPath));
      if not FileExists(String(SystemPath)+'\VCF132.OCX') then
        FileCopy(ExtractFilePath(Application.ExeName)+'VCF132.OCX',String(SystemPath)+'\VCF132.OCX');
      if not FileExists(String(SystemPath)+'\MFCANS32.DLL') then
        FileCopy(ExtractFilePath(Application.ExeName)+'MFCANS32.DLL',String(SystemPath)+'\MFCANS32.DLL');
      if not FileExists(String(SystemPath)+'\OC30.DLL') then
        FileCopy(ExtractFilePath(Application.ExeName)+'OC30.DLL',String(SystemPath)+'\OC30.DLL');
      reg.RootKey:=HKEY_CLASSES_ROOT;
      reg.OpenKey('CLSID',true);
      reg.CreateKey('{042BADC5-5E58-11CE-B610-524153480001}');
      reg.CloseKey;
      reg.OpenKey('CLSID\{042BADC5-5E58-11CE-B610-524153480001}',true);
      reg.CreateKey('Control');
      reg.CreateKey('InprocServer32');
      reg.CreateKey('Insertable');
      reg.CreateKey('MiscStatus');
      reg.CreateKey('ProgID');
      reg.CreateKey('ToolboxBitmap32');
      reg.CreateKey('TypeLib');
      reg.CreateKey('Version');
      reg.CloseKey;
      reg.OpenKey('CLSID\{042BADC5-5E58-11CE-B610-524153480001}\MiscStatus',true);
      reg.CreateKey('1');
      reg.CloseKey;  reg.OpenKey('CLSID\{042BADC5-5E58-11CE-B610-524153480001}',true);
      reg.WriteString('','VCI Formula One Workbook');
      reg.CloseKey;  reg.OpenKey('CLSID\{042BADC5-5E58-11CE-B610-524153480001}\Control',true);
      reg.WriteString('','');
      reg.CloseKey;  reg.OpenKey('CLSID\{042BADC5-5E58-11CE-B610-524153480001}\InprocServer32',true);
      reg.WriteString('',String(SystemPath)+'\VCF132.OCX');
      reg.WriteExpandString('InprocServer32','^uv}cbtOd=C@mz_LeE8ESampleActiveXControls>kYzUhjF)g(wDDeflCw25');
      reg.CloseKey;  reg.OpenKey('CLSID\{042BADC5-5E58-11CE-B610-524153480001}\Insertable',true);
      reg.WriteString('','');
      reg.CloseKey;  reg.OpenKey('CLSID\{042BADC5-5E58-11CE-B610-524153480001}\MiscStatus',true);
      reg.WriteString('','0');
      reg.CloseKey;  reg.OpenKey('CLSID\{042BADC5-5E58-11CE-B610-524153480001}\MiscStatus\1',true);
      reg.WriteString('','131473');
      reg.CloseKey;  reg.OpenKey('CLSID\{042BADC5-5E58-11CE-B610-524153480001}\ProgID',true);
      reg.WriteString('','VCF1.VCF1Ctrl.1');
      reg.CloseKey;  reg.OpenKey('CLSID\{042BADC5-5E58-11CE-B610-524153480001}\ToolboxBitmap32',true);
      reg.WriteString('',String(SystemPath)+'\VCF132.OCX, 1');
      reg.CloseKey;  reg.OpenKey('CLSID\{042BADC5-5E58-11CE-B610-524153480001}\TypeLib',true);
      reg.WriteString('','{042BADC8-5E58-11CE-B610-524153480001}');
      reg.CloseKey;  reg.OpenKey('CLSID\{042BADC5-5E58-11CE-B610-524153480001}\Version',true);
      reg.WriteString('','1.0');
      reg.CloseKey; 
      reg.Free;
    end;