获取windows版本信息
![](http://images0.cnblogs.com/blog/300447/201407/291650007272613.png)
procedure TForm1.Button1Click(Sender: TObject);
Var
OSVI:OSVERSIONINFO;
begin
OSVI.dwOSversioninfoSize:=Sizeof(OSVERSIONINFO);
GetVersionEx(OSVI);
Caption:=IntToStr(OSVI.dwMinorVersion)+','
+IntToStr(OSVI.dwMinorVersion)+','
+IntToStr(OSVI.dwBuildNumber)+','
+IntToStr(OSVI.dwPlatformId)+','
+OSVI.szCSDVersion;
end;