Vista 上缺少 AppData\Roaming\ 文件夹

发布于 2024-08-19 00:30:53 字数 223 浏览 2 评论 0原文

我正在使用的应用程序写入 XP 上的 User\Application Data 文件夹和 Vista 上的 AppData\Roaming 文件夹。在其中一台 Vista 计算机上,AppData\Roaming 文件夹不存在。因此,该应用程序的某些功能无法运行。 你们中有人遇到过这样的场景吗?我不知道在这种情况下该怎么办。我可以创建 AppData\Roaming 文件夹吗?

谢谢 杰布斯普72

The application I am working with writes to the User\Application Data folder on XP and the AppData\Roaming folder on Vista. On one of the Vista machines the AppData\Roaming folder is not present. As a result some of the features of the application are not functioning.
Have any of you encountered such a scenario before? I am not sure what to do in this case. Can I create the AppData\Roaming folder?

Thanks
jbsp72

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

简单气质女生网名 2024-08-26 00:30:53

如果您对这些路径进行硬编码,则应该改用环境变量。

在相关计算机上,打开命令提示符 (WinKey+R>cmd>Enter) 并输入 echo %appdata% 并按 Enter。它应该返回当前用户的应用程序数据路径。

...哦,要使用环境变量,请将 c:\Program Files\MyProgram\data 替换为 %programfiles%\MyProgram\data

有很多列表其中可用,其中位于 http://vistaonwindows.com/environment_variables.html

If you're hardcoding those paths, you should be using environment variables instead.

On the machine in question, open a command prompt (WinKey+R>cmd>Enter) and enter echo %appdata% and press Enter. It should return the application data path for the current user.

...oh, and to use environment variables, replace, for example c:\Program Files\MyProgram\data with %programfiles%\MyProgram\data

There are many lists of these available, on of which is at http://vistaonwindows.com/environment_variables.html

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文