procedure GetWindowsTmpPath(var windowsTmpPath:string);
var
s:array[0..255] of char;
begin
Gettemppath(sizeof(s),s);
windowstmpPath:=s;
end;
var
s:array[0..255] of char;
begin
Gettemppath(sizeof(s),s);
windowstmpPath:=s;
end;
var
s:array[0..255] of char;
begin
Gettemppath(256,@s);
windowstmpPath:=s;
end;
备注:临时目录的确定原则:1,如果有TMP环境变量则临时目录为TMP指定的目录2,如果没有TMP环境变量而有TEMP环境变量,则为TEMP变量指定的目录3,如果TMP和TEMP都没有定义,则取当前目录为临时目录
如:D:\Documents and Settings\Administrator
不是D:\Docume~1\Admini~1 这一种