简体   繁体   English

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

[英]Environment.SpecialFolder.ProgramFiles value for a 32-bit application on Windows 7?

What would a 32-bit application running on Windows 7 return for the below? 在Windows 7上运行的32位应用程序将返回以下内容?

Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles)

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

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

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. 这两个值都将映射到同一文件夹,文件系统虚拟化将始终将其映射到(x86)32位应用程序。

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 好吧,我正在运行Windows 7 Ultimate 32位,所以我想知道返回的是什么,所以我把它放到一个控制台应用程序中,看看返回了什么

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

And it returned C:\\Program Files 它返回了C:\\ Program Files

C:\\ Program Files(x86)

“C:\\ Program Files(x86)”

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Environment.SpecialFolder.ProgramFiles返回错误的目录 - Environment.SpecialFolder.ProgramFiles returns the wrong directory 如何在Environment.SpecialFolder.ProgramFiles C#中转义空间 - how to escape the space in Environment.SpecialFolder.ProgramFiles C# 使用x64安装程序卸载Windows服务时,Environment.SpecialFolder.ProgramFiles返回“程序文件(x86)” - When uninstalling a windows service with a x64 installer , Environment.SpecialFolder.ProgramFiles returns “Program Files (x86)” 返回x86的Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles) - Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles) returning x86 VS2010(C#)Environment.SpecialFolder.ProgramFiles是解决方案项目中的位置? - VS2010 (C#) Environment.SpecialFolder.ProgramFiles is where in the Solution Project? 使用Environment.Is64BitProcess从c#应用程序动态调用32位或64位DLL - Dynamically calling 32-bit or 64-bit DLL from c# application using Environment.Is64BitProcess 使用NUnit在64位Windows上测试32位汇编 - Test 32-bit assembly on a 64 bit windows with NUnit Windows Server 2003 32位计算机应用程序可以用于Windows Server 2008 64位计算机吗? - Can a Windows Server 2003 32-bit machine application work for a Windows Server 2008 64-bit machine? 使用32位应用程序中的64位库 - Use 64-bit library from 32-bit application SpecialFolder.MyDocuments在控制台应用程序中提供正确的值,但在Windows服务上没有 - SpecialFolder.MyDocuments giving correct value in a console application but not on a Windows Service
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM