Mega Code Archive

 
Categories / Delphi / LAN Web TCP
 

How to get the start command for a installed Mail Client

Title: How to get the start command for a installed Mail-Client uses Registry; function GetMailClientOpenCommand(AMailClient: string): string; const RegClientsRoot = '\SOFTWARE\Clients'; RegClientsMail = '\Mail'; RegClientsOpenCmd = '\shell\open\command'; var reg: TRegistry; begin Result := ''; reg := TRegistry.Create; try with reg do begin CloseKey; RootKey := HKEY_LOCAL_MACHINE; if OpenKeyReadOnly(RegClientsroot + RegClientsMail + '\' + AMailClient + RegClientsOpenCmd) then Result := reg.ReadString(''); end; finally if Assigned(reg) then reg.Free; end; end;