Adding and removing a
shell extension.
The following code shows you how to add and remove a shell extension in Delphi. This code was taken from borland.public.delphi.winapi, written by Erik Turner. See also: Shell namespace information |
FileType
:= FileExt;
if
FileType <> '*' then
begin
if not OpenKey(FileExt, False) then Exit;
FileType := ReadString('');
CloseKey;
end;
Key
:= Format('%s\shellex\ContextMenuHandlers\%s',
[FileType,UtilityName]);
DeleteKey(Key);
Key
:= Format('CLSID\%s', [BufGUID]);
DeleteKey(Key);
finally
Free;
end; {try}
end;
Return
to the main page