How to find the path of the windows temporary directory.
function WindowsTemp : String;
var
Buffer : Array[0..Max_path] of char;
begin
FillChar(Buffer,Max_Path + 1, 0);
GetTempPath(Max_path, Buffer);
Result := String(Buffer);
if Result[Length(Result)] <> '\' then Result := Result + '\';
end;