Проверить, установлен ли Word

{codecitation class=»brush: pascal; gutter: false;» width=»600px»}

uses

Registry;

function IsWordInstalled: Boolean;

var

Reg: TRegistry;

s: string;

begin

Reg := TRegistry.Create;

try

Reg.RootKey := HKEY_CLASSES_ROOT;

Result := Reg.KeyExists(‘Word.Application’);

finally

Free;

end;

end;

procedure TForm1.Button1Click(Sender: TObject);

begin

if IsWordInstalled then

ShowMessage(‘MS Word is installed.’);

end;

{/codecitation}

Добавить комментарий