为什么 %TEMP% 解析为 %TEMP\<digit> 形式的非确定性路径?

编程入门 行业动态 更新时间:2024-10-22 23:42:15
本文介绍了为什么 %TEMP% 解析为 %TEMP\<digit> 形式的非确定性路径?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送ChatGPT账号..

我有一个 Windows Server 2008 32 位,当我输入 %temp% 时,它会将我带到 ..AppData\Local\Temp\1\ 或 ..AppData\Local\Temp\2 而不是 ..AppData\本地\温度

I have a Windows Server 2008 32 bit and when I'm typing %temp% it takes me to ..AppData\Local\Temp\1\ or ..AppData\Local\Temp\2 instead of ..AppData\Local\Temp

我已经检查了环境变量,它们没问题.

I've already checked the Environment Variables and they are ok.

我之所以这么问是因为我有一个应用程序应该将文件复制到 %temp%\my application,而是将文件复制到 %temp%\1\my application

I'm asking that because I have an application that's supposed to copy files to %temp%\my application and instead it copies the files to %temp%\1\my application

有人有解决方案吗?

推荐答案

说明、讨论、解决方法等,均在 Old New Thing 文章 为什么我的 TEMP 目录的名称不断变化 - 它确保同一用户的多个终端服务会话不会(默认情况下)) 共享一个临时目录.

Explanation, discussion, workarounds, etc, all under the Old New Thing article Why does the name of my TEMP directory keep changing - it ensures multiple terminal services sessions for the same user don't (by default) share a temp directory.

问题出在 Administrative Templates\Windows Components\Terminal Services\Temporary folders 组策略.如果您不选择不为每个会话使用临时文件夹,则会创建这些 TEMP 子目录.还有知识库文章描述了这些组策略背后的注册表项.

The problem lay in the Administrative Templates\Windows Components\Terminal Services\Temporary folders group policy. If you don't select Do not use temporary folders per session, then these TEMP subdirectories are created. There is also a knowledge base article describing the registry keys behind these group policies.

就我个人而言,我发现回复中的第一条评论最有用:

Personally, I find the first comment in reply to be the most useful:

无论如何,临时位置跳来跳去有什么关系,这是暂时的!

Why does it matter if the temp location jumps around anyway, it's temporary!

另见

为每个会话使用单独的临时文件夹

这篇关于为什么 %TEMP% 解析为 %TEMP\<digit> 形式的非确定性路径?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

更多推荐

[db:关键词]

本文发布于:2023-04-25 22:53:14,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1125464.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:确定性   路径   形式   lt   TEMP

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!