What's the difference between %TMP% and %TEMP% in Vista environment variables?

后端 未结 4 1630
北海茫月
北海茫月 2021-01-01 12:17

On my computer, the environment variables %TMP% and %TEMP% both point to the same location.

Are those for backward compatibility issues only, or is there a real dif

4条回答
  •  [愿得一人]
    2021-01-01 12:49

    Raymond Chen talks about the historical use of TMP and TEMP, and says this specifically about Windows:

    For whatever reason, the original authors of the Get­Temp­File­Name function chose to look for TMP before looking for TEMP.

    The rest of the article is worth a read in explaining the historical use of both in DOS. It sounds like DOS preferred TEMP semi-officially, rather than TMP, but third-party programmers were free to use what they liked, particularly given the lack of the standard API functions that Windows has.

提交回复
热议问题