procedure TForm1.Button1Click(Sender: TObject); var t: array[0..512] of Char; begin GetTempPath(511,t); Label1.Caption:=t; end;