和这个基本一样question , 但对于 VB6。
A customer's application "AppName" has its configuration files stored in CommonAppData.
- Under Windows XP that is C:\Documents and Settings\All Users\Application Data\AppName
- Under Windows Vista that is C:\ProgramData\AppName
How do I get the correct foldername with VB6??
附加说明,我更喜欢使用 API 调用而不是添加对 shell32.dll 的引用
最佳答案
使用后期绑定(bind):
Const ssfCOMMONAPPDATA = &H23
Dim strCommonAppData As String
strCommonAppData = _
CreateObject("Shell.Application").NameSpace(ssfCOMMONAPPDATA).Self.Path
关于windows - vb6 中的 CommonAppData,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3054802/