[b]uses[/b]
Registry, ComObj;
[b]procedure[/b] CreateExplorerButton([b]const[/b] szAppname, szButtonText,
szMenuText, szStatusbarText: [b]string[/b]; [b]const[/b] IsVisible: boolean;
[b]const[/b] szHotIcon, szIcon: [b]string[/b]);
[b]const[/b]
IEExtensions = 'Software\Microsoft\Internet Explorer\Extensions\';
DefVisible : [b]array[/b][boolean][b]of[/b] [b]string[/b] = ('No','Yes');
[b]var[/b]
reg : TRegistry;
[b]begin[/b]
reg := TRegistry.Create;
[b]with[/b] reg [b]do[/b]
[b]try[/b]
RootKey := HKEY_LOCAL_MACHINE;
[b]if[/b](OpenKey(IEExtensions + CreateClassId,true)) [b]then[/b]
[b]try[/b]
WriteString('ButtonText',szButtonText);
WriteString('MenuText',szMenuText);
WriteString('MenuStatusBar',szStatusbarText);
WriteString('
CLSID','{1FBA04EE-3024-11d2-8F1F-0000F87ABD16}');
WriteString('Default Visible',DefVisible[IsVisible]);
WriteString('Exec','"' + szAppname + '"');
WriteString('HotIcon',szHoticon);
WriteString('Icon',szIcon);
[b]finally[/b]
CloseKey;
[b]end[/b];
[b]finally[/b]
Free;
[b]end[/b];
[b]end[/b];