Q:  How can I get the windows or dos versions?

A:  The API call of GetVersions will do it, but the information is encrypted into a longint.  Here is how to get and decrypt the information:

Type TGetVer = record WinVer, WinRev, DosRev, DosVer: Byte; end;

procedure TForm1.Button1Click(Sender: TObject);
var AllVersions: longint;
begin
  AllVersions := GetVersion;
  edit1.text := IntToStr(TGetVer(AllVersions).WinVer) + '.' +
                IntToStr(TGetVer(AllVersions).WinRev);
  edit2.text := IntToStr(TGetVer(AllVersions).DosVer) + '.' +
                IntToStr(TGetVer(AllVersions).DosRev);
end;

Note:  The values that windows displays for the versions and the values that it returns through its API call are not always the same.  e.g.  The workgroup version displays as 3.10 rather than 3.11.