从别人那里套过来的:
procedure TForm1.BitBtn1Click(Sender: TObject);
var
rg:Tregistry;
begin
rg:=Tregistry.create;
rg.rootkey:=HKEY_LOCAL_MACHINE;
rg.openkey('SOFTWARE/MICROSOFT/INTERNET EXPLORER/
EXTENSIONS/{0713E8D2-850A-101B-AFC0-4210102A8DA7}',true);
rg.writestring('BUTTONTEXT','我的按钮');//显示文本
rg.writestring('CLSID','{1FBA04EE-3024-11D2-8F1F-0000F87ABD16}');
rg.writestring('DEFAULT VISIBLE','YES');
rg.writestring('EXEC','d:/path/myprog.ext');//此处为你要执行的程序
rg.writestring('ICON','d:/mypath/my1.ico');
rg.writestring('HOTICON','d:/mypath/my2.ico');
rg.closekey;
rg.free;
end;
详情还是请看cAKK提供的答案吧!
<a href='http://www.gislab.ecnu.edu.cn/delphibbs/DispQ.asp?LID=159374'>www.gislab.ecnu.edu.cn/delphibbs/DispQ.asp?LID=159374
</a>