Delphi 根据注册表信息判断程序是否安装


本文整理自网络,侵删。

 
function IsAppmethodInstalled( SVers: String ): Boolean;
var
  Vers: Integer;
  i: Integer;
  DefApp: String;
begin
  // check if Delphi is installed
  // 50 = Delphi5, 60 = Delphi 6 etc,
  // can check for ANY of multiple versions of delphi if separated by spaces
  i := Pos(' ', SVers);
  if i > 0 then
  begin
    result := IsAppmethodInstalled( Copy(SVers, i + 1, Length(SVers)) );
    if result then Exit;
    SVers := Copy(SVers, 1, i-1);
  end;
  Vers := StrToInt(SVers);
  case Vers of
    200: result := RegQueryStringValue( HKCU, 'SOFTWARE\Embarcadero\BDS\14.0\Personalities', '', DefApp ); // XE6/Appmethod 1.14
  else
    result := False;
  end;
  if result then
  begin
    result := DefApp = 'Appmethod';
  end;
end;

相关阅读 >>

Delphi 鼠标跟随代码

Delphi中emptyparam参数被改写问题

Delphi批量删除同类文件(带通配符)

Delphi winapi: getmodulehandle - 获取一个模块(exe 或 dll)的句柄

Delphi的datetostr strtodate格式灵活用法

Delphi中判断某个文件是否已经打开

Delphi之memo组件

Delphi假死线程堵塞解决办法

Delphi 禁止截屏printscreen

Delphi提取exe,dll文件的icon图标

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...