Articles

Use GetWindowsDirectory Win32 function:

procedure TForm1.Button1Click(Sender: TObject);
var
  PWindowsDir: array [0..255] of Char;
begin
  GetWindowsDirectory(PWindowsDir,255);
  Label1.Caption:=StrPas(PWindowsDir);
end;