Hola
dtomeysoto
Si lo único que quieres es obtener la ruta de la carpeta temporal para el usuario activo, utiliza este código:
Código Delphi
[-]
function GetTempDir: 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;
Saludos.