System32 folder in windows 7

微笑、不失礼 提交于 2019-12-05 11:51:55

It will return c:\windows\system32, even in a 32-bit program that runs on the 64-bit version of Windows. Do not fix this, it doesn't need fixing. Because when you use that path, Windows will automatically remap it to c:\windows\syswow64. The file system redirector takes care of it.

I tried on my Windows7 box with .NET 4.0

This code:

Console.WriteLine(Environment.GetFolderPath(Environment.SpecialFolder.System));
Console.WriteLine(Environment.GetFolderPath(Environment.SpecialFolder.SystemX86));

Prints the following from both 32- and 64-bit process:

C:\Windows\system32
C:\Windows\SysWOW64

Nope. On my Windows 7 64-bit box, targeting x64:

C:\Windows\system32
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!