Получить стартовую команду для установленного почтового клиента
Оформил: DeeCo
Автор: http://www.swissdelphicenter.ch
{
Kommando ermitteln, mit welchem ein bestimmter,
installierter Mail-Client gestartet werden kann.
Get command to start a specific, 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;
|