检测系统是不是windows xp
--------------------------------------------------------------------------------
作者:不详 来源于:不详 发布时间:2005-3-19 11:10:39
下面的代码可以检查所用的系统是不是windows xp
uses Registry;
...
function IsWinXP: Boolean;
begin
Result := False;
if Win32Platform = VER_PLATFORM_WIN32_NT then
with TRegistry.Create do
try
RootKey := HKEY_LOCAL_MACHINE;
if OpenKeyReadOnly('\Software\Microsoft\Windows NT\CurrentVersion') then
Result := (ReadString('ProductName') = 'Microsoft Windows XP');
finally
Free;
end;
end;