Windows 7 上 32 位应用程序的 Environment.SpecialFolder.ProgramFiles 值?

发布于 2024-09-12 19:58:09 字数 216 浏览 1 评论 0原文

对于以下情况,在 Windows 7 上运行的 32 位应用程序会返回什么?

Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles)

C:\Program Files (x86) 还是 C:\Program Files

What would a 32-bit application running on Windows 7 return for the below?

Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles)

C:\Program Files (x86) or C:\Program Files?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

三生路 2024-09-19 19:58:09

在 32 位 Windows 7 上,您应该获得“C:\Program Files”,在 64 位上,您应该获得“C:\Program Files (x86)”。

On 32 bit Windows 7 you should get "C:\Program Files", on 64 bit "C:\Program Files (x86)".

梦纸 2024-09-19 19:58:09

它返回什么并不重要。任一值都将映射到同一文件夹,对于 32 位应用程序,文件系统虚拟化将始终将其映射到 (x86)。

It doesn't matter what it returns. Either value will map to the same folder, file system virtualization will always map it to (x86) for a 32-bit app.

无可置疑 2024-09-19 19:58:09

好吧,我运行的是 Windows 7 Ultimate 32 位,所以我想确定返回的内容,因此我将其放入控制台应用程序中以查看返回的内容

Console.WriteLine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles));

,它返回了 C:\Program Files

Well I'm running Windows 7 Ultimate 32 bit so I wanted to know for sure what was returned, so I put this into a console application to see what was returned

Console.WriteLine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles));

And it returned C:\Program Files

匿名的好友 2024-09-19 19:58:09

C:\程序文件 (x86)

C:\Program Files (x86)

铜锣湾横着走 2024-09-19 19:58:09

“C:\程序文件 (x86)”

"C:\Program Files (x86)"

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文