开发者

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?

Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles)

C:\Program Files (x86) or C:\P开发者_如何转开发rogram Files?


On 32 bit Windows 7 you should get "C:\Program Files", on 64 bit "C:\Program Files (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.


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


C:\Program Files (x86)


"C:\Program Files (x86)"

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜