本文整理自网络,侵删。
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 isipadress 非正则表达式验证ip的方法
Delphi中exit,abort,break,continue的区别介绍
Delphi getmimetypefromfile 获取文件mime类型
Delphi setpriorityclass 设置当前程序的优先级
Delphi fdconnection1 获取数据库总记录数
Delphi 从给定字符串中截取n个字节的字符(解决汉字截取乱码问题)
Delphi 缓冲文件流-tbufferedfilestream tfilestream 性能测试
更多相关阅读请进入《Delphi》频道 >>