Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
可能重复: 如何获取特定用户的 Windows“特殊文件夹”的路径?
是否可以获取不是在 C# 中运行程序的用户的给定用户的应用程序数据目录?
一种简单但有点笨拙的方法是为运行程序的用户获取 %appdata% 目录,然后将他们的用户名换成您感兴趣的用户名。它应该在 99% 的时间内工作,但可能会失败罕见的场合。