每台机器应用程序数据文件

时间:2013-11-16 00:13:10

标签: c# .net special-folders app-certification-kit

我正在使用

Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);

获取存储用户数据的路径。这相当于:

C:\Users\<User Name>\AppData\Roaming

如果我对每个用户进行Windows 8.1桌面应用程序认证,则不会收到任何警告。如果我选择“每台机器”,则会收到以下警告:

Multiuser session test
WARNING 
Do not write to the 'Users' folder
Warning: The user folder test detected the following errors: 
File C:\Users\<User>\AppData\Roaming\<MyCompany>\<MyApp>\<MyFile> was written to an incorrect location.


Impact if not fixed: Different users might not be able to run the app in concurrent sessions. 

How to fix:  The app must run in multiple concurrent local and remote sessions. The app should not require administrator privileges when it runs. User data and settings must be isolated to the user’s profile. See link below for more information: 
Remote Desktop Services programming guidelines 
  1. 为多个用户写入文件夹有什么问题?

  2. 我为多个用户使用什么文件夹/常量来写,如果没有?

  3. 我意识到我可以写入MyDocuments文件夹,但这不是正确的位置。我喜欢这些好处。此外,如果两个不同的用户登录系统,则:

    C:\Users\<User1>\AppData\Roaming
    C:\Users\<User2>\AppData\Roaming
    

0 个答案:

没有答案