procedure CopyOldFiletype(Ext: string; NewFiletype: string); var OldType: string; OldIcon: string; OldApp: string; begin if RegValueExists(HKCR, '.' + Ext, '') then begin RegQueryStringValue(HKCR, '.' + Ext, '', OldType) if RegQueryStringValue(HKCR, 'OldType', 'DefaultIcon', '', OldIcon) then RegWriteStringValue(HKCR, 'NewFiletype', 'DefaultIcon', '', 'OldIcon'); if RegQueryStringValue(HKCR, 'OldType', 'shell', 'open', 'command', '', OldApp) then RegWriteStringValue(HKCR, 'NewFiletype', 'shell', 'open', 'command', '', 'OldApp'); end; end; procedure CopyOldFiletypes; begin CopyOldFiletype('mkv', 'MatroskaVideo'); CopyOldFiletype('mka', 'MatroskaVideo'); CopyOldFiletype('mp4', 'mp4file'); CopyOldFiletype('ogm', 'ogmfile'); end;