Vista和ProgramData [英] Vista and ProgramData

查看:89
本文介绍了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()的CSIDL为CSIDL_COMMON_APPDATA。

SHGetFolderPath() with CSIDL of CSIDL_COMMON_APPDATA.

有关详细信息,请参见 http://msdn.microsoft.com/zh-cn/library/bb762181(VS.85).aspx

Read more at 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天全站免登陆