【问题标题】:How to get a given user's AppData directory in C#? [duplicate]如何在 C# 中获取给定用户的 AppData 目录? [复制]
【发布时间】:2009-08-13 14:17:55
【问题描述】:

可能重复:
How can I get the path of a Windows "special folder" for a specific user?

是否可以获得给定用户的应用程序数据目录,该用户不是在 C# 中运行程序的用户?

【问题讨论】:

标签: c# directory appdata


【解决方案1】:

一种简单但有点老套的方法是,为运行程序的用户获取 %appdata% 目录,然后将他们的用户名替换为您感兴趣的用户名。它应该可以工作99% 的时间,但在极少数情况下可能会失败。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-10-22
    • 1970-01-01
    • 2013-09-25
    • 1970-01-01
    • 2010-09-23
    • 1970-01-01
    相关资源
    最近更新 更多