English 中文(简体)
% TEMP% 和% TMP% 表示计算机运行终端服务的不同地点
原标题:Does %TEMP% and %TMP% referes different locations for computers running Terminal Service

窗口 2000 正在运行的计算机终端服务为每个终端会话创建临时文件夹,并将十六进制值附加到由环境变量% TEMP% 描述的临时文件夹名称中。

参考参考参考参考参考文献

临时文件夹

为每届会议使用单独的临时文件夹

我的疑问是 %TMP% 是否也以与%TEMP% 相似的方式行事,或者它指不同的地点(%TEMP% 的父目录)。

note 我知道人们会说这个问题与SU有关,但我正试图用我程序中的环境变量作为临时商店。因此,这使其成为一个编程问题。问题是,一旦用户日志导致问题崩溃, TEMP 文件夹就会被删除。我理解这不是使用临时商店的好办法,但我们只是在寻找一个短期解决办法,直到我们找到更好的办法为止。

问题回答

https://stackoverflow.com/uss/44318/torgoguy" >TorgoGUy 回答一个类似这个问题的问题:

It is for compatibility. It goes all the way back to DOS. Since there were no standards, some DOS (and Win 3.x) applications would look for the %TMP% environment variable and others would look for %TEMP%. You were best off if you set both of them in the AUTOEXEC.BAT file.

Windows NT set both of them automatically just to make sure all of the apps continued to work OK. %TEMP% is the standard now, but %TMP% lives on.

是, 两个变量都指向同一位置

希望这能帮上忙





相关问题
Why running a service as Local System is bad on windows?

I am trying to find out the difference between difference service account types. I tumbled upon this question. The answer was because it has powerful access to local resources, and Network Service ...

Programmatically detect Windows cluster configuration?

Does anyone know how to programatically detect that a Windows server is part of a cluster? Further, is it possible to detect that the server is the active or passive node? [Edit] And detect it from ...

get file icon for Outlook appointment (.msg)

I ve read Get File Icon used by Shell and the other similar posts - and already use SHFileInfo to get the associated icon for any given extension, and that works great. However, Outlook uses ".msg" ...

Identifying idle state on a windows machine

I know about the GetLastInputInfo method but that would only give me the duration since last user input - keyboard or mouse. If a user input was last received 10 minutes ago, that wouldn t mean the ...

Terminating a thread gracefully not using TerminateThread()

My application creates a thread and that runs in the background all the time. I can only terminate the thread manually, not from within the thread callback function. At the moment I am using ...

热门标签