Vista 和 ProgramData [英] Vista and ProgramData

查看:15
本文介绍了Vista 和 ProgramData的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

存储每个用户都相同但必须对程序可写的程序数据文件的正确位置是什么?MS Windows XP 上的等效位置是什么?我已经读到 C:ProgramData 在普通用户安装后不可写.真的吗?如何使用 Platform SDK 以编程方式检索该目录?

What is the right place to store program data files which are the same for every user but have to be writeable for the program? What would be the equivalent location on MS Windows XP? I have read that C:ProgramData is not writeable after installation by normal users. Is that true? How can I retrieve that directory programmatically using the Platform SDK?

推荐答案

SHGetFolderPath() with CSIDL_COMMON_APPDATA.

SHGetFolderPath() with CSIDL of CSIDL_COMMON_APPDATA.

http://msdn.microsoft 阅读更多信息.com/en-us/library/bb762181(VS.85).aspx

如果需要批处理文件中的路径,也可以使用 %ALLUSERSPROFILE% 环境变量.

If you need the path in a batch file, you can also use the %ALLUSERSPROFILE% environment variable.

这篇关于Vista 和 ProgramData的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆