delphi 7,安装组件在安装时隐藏

Pre*_*ias 3 delphi components delphi-7 custom-component

我正在为一个组件进行delphi 7快速安装而不必触摸IDE我正在制作一个简单的安装程序,根据Marjan Venema的这个SO答案 .

    procedure TForm1.Button1Click(Sender: TObject);
    var
      sDelphi7PackageName : string;
      sDelphi7Path,fileSource,fileDest : string;
      sDelphi7packBPL,sDelphi7PathMenuBPL  : string;
    begin
       sDelphi7Path:=ReadRegistryValues('\Software\Borland\Delphi\7.0',FALSE,'RootDir',1,TRUE);{<-- returns the 'C:\Program Files\Borland\Delphi7' }

      {#1. Install .bpl}
      sDelphi7BPL:=sDelphi7Path+'\Projects\Bpl\Pack.bpl';
      WriteValueToRegisTry('\Software\Borland\Delphi\7.0\Known   Packages',FALSE,sDelphi7BPL,'Delphi 7 compo Bpl File'); {<-- writes to the registry}

      fileSource:=ExtractFilePath(Application.ExeName)+'\Packages\comPack.bpl';
      fileDest:=sDelphi7BPL;
      CopyFile(PChar(fileSource), PChar(fileDest), False);
      end;
Run Code Online (Sandbox Code Playgroud)

这工作正常![在此处输入图像描述] [2] C:\Program Files\Borland\Delphi7\Projects\Bpl\Pack.bpl.但组件安装了idhidden

谁能告诉我如何unhidecomponent上安装吗?

编辑

可能有用:

1)我已经拥有bpl组件的文件,所以我直接复制到delphi 7目录C:\Program Files\Borland\Delphi7\Projects\Bpl并修改注册表HKEY_CURRENT_USER\Software\Borland\Delphi\7.0\Known Packages.

2)register组件的程序

 implementation
 procedure Register;
  begin
      RegisterComponents('comp', [Tcomp]);
  end;
Run Code Online (Sandbox Code Playgroud)

Ond*_*lle 8

在注册表中,在下面HKEY_CURRENT_USER\Software\Borland\Delphi\7.0\Palette找到命名的条目'comp.Hidden'并对其进行编辑以删除组件的类名(或完全删除条目).