擅长:python、mysql、java
<p>在64位Windows上运行的32位进程具有可用于此问题的<code>sysnative</code>别名。</p>
<pre>
C:\Windows\System32>systeminfo | find "System Type"
System Type: x64-based PC
C:\Windows\System32>dir /b msconfig.exe
msconfig.exe
C:\Windows\System32>python
Python 2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> 'msconfig.exe' in os.listdir(r'c:\windows\system32')
False
>>> 'msconfig.exe' in os.listdir(r'c:\windows\sysnative')
True
>>>
</pre>
<p>见<a href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa384187%28v=vs.85%29.aspx" rel="nofollow" title="File System Redirector (MSDN)">File System Redirector (MSDN)</a>,上面写着:</p>
<blockquote>
<p>32-bit applications can access the native system directory by substituting %windir%\Sysnative for %windir%\System32.</p>
</blockquote>