Dlaczego przy wywoływaniu tej procedury, zawsze wywołuje AV ... - nie wiem dlaczego jest źle napisana.
Cel: ustawienie standardowego edytora HTML na notatnika windows...
procedure HTMLUnAssociate;
var
Reg: TRegistry;
s: PChar;
begin
s := '';
GetWindowsDirectory(S, MAX_PATH);
Reg := TRegistry.Create;
Reg.RootKey := HKEY_CURRENT_USER;
Reg.OpenKey('Software\Microsoft\Internet Explorer\Default HTML Editor', False);
Reg.WriteString('Description', 'Notatnik');
Reg.OpenKey('Software\Microsoft\Internet Explorer\Default HTML Editor\shell\edit\command', False);
Reg.WriteString('', String(s) + 'notepad.exe "%1"');
end;