procedure
RegUpdate(GUID: TGUID; Index:
string
);
var
ClassID:
string
;
begin
ClassID := GUIDToString( GUID );
CreateRegKey(
'Software\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\Ext'
+ Index,
''
, ClassID, HKEY_LOCAL_MACHINE);
MessageBox(
0
,
PWidechar
(Index),
''
,
0
);
with
TRegistry
.
Create
do
try
RootKey := HKEY_LOCAL_MACHINE;
OpenKey(
'SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions'
,
True
);
OpenKey(
'Approved'
,
True
);
WriteString(ClassID,
'Icon Overlay Shell Extension'
);
finally
Free;
end
;
end
;
begin
if
Register
then
begin
inherited
UpdateRegistry(Register);
RegUpdate( Class_IconOverlay_Ok,
'1'
);
end
else
begin
DeleteRegKey(
'Software\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\Ext1'
, HKEY_LOCAL_MACHINE);
inherited
UpdateRegistry(Register);
end
;
end
;