In </span>this article</span></u></a> we explained that in a 64-bit Windows the System32</b> folder is intended for 64-bit binary files (DLL files etc.) and the SysWOW64</b> folder is intended for 32-bit binary files.</span> In the article we also explained that if a 32-bit application includes the "\System32" folder name in a folder path, the system automatically makes a redirection to the SysWOW64</b> folder. This is to prevent compatibility problems when applications are compiled to 64-bit executables.
</span>
</span>But if a 32-bit application really needs access to the 64-bit System32</b> folder in a 64-bit Windows; is it possible? The answer is yes</i>, it is possible, and in this article we will show you how this can be done.
</span>

The 'Sysnative' folder</span></strong>
</span>  </span>
</span>As explained above, accessing the 64-bit System32</b> folder from a 32-bit application by simply inserting "\System32" in the folder path is not possible. A redirection to the SysWOW64</b> folder is made automatically by the system if you try that. But there is another folder name that can be used instead: Sysnative</b>.
</span>
</span>Sysnative</b> is a virtual folder, a special alias, that can be used to access the 64-bit System32</b> folder from a 32-bit application or script. If you for example specify this folder path in your application's source code:
</span>

C:\Windows\Sysnative</b></span></td>
</tr>
</tbody>
</table>

the following folder path is actually used:
</span>

C:\Windows\System32</b></span></td>
</tr>
</tbody>
</table>
 

The 'Sysnative' folder is invisible in Windows Explorer</span></b>
</span>  </span>
</span>If you start Windows Explorer and open the Windows</b> folder on your hard disk, you may notice that the Sysnative</b> folder is not shown. The main reason to this is that Windows Explorer is a 64-bit program (when run in a 64-bit Windows), and the Sysnative</b> folder is only visible and accessible from 32-bit software. If 64-bit software need access to the 64-bit system folder in Windows, the only option is to use the System32</b> folder name (for example: C:\Windows\System32</b>).</span>

Using the 'Sysnative' folder will help you access 64-bit tools from 32-bit code</span></b>
</span>  </span>
</span>Some tools in a 64-bit Windows only exist in a 64-bit version; there is no 32-bit version available. And some of these tools are located in the 64-bit System32</b> folder. One example is the nbtstat</b> tool that is used to help troubleshoot NetBIOS name resolution problems. If you try to run the nbtstat</b> tool from 32-bit code (for example from an application or from script) and use a path like C:\Windows\System32</b>, you will get a "File not found" error. The file can not be found; although Windows Explorer shows that the nbtstat</b> program file actually is located in the C:\Windows\System32</b> folder.
</span>
</span>The solution to this (somewhat confusing) problem is to include the virtual Sysnative</b> folder in the folder path when you want to run the tool. For example like this:
</span>

C:\Windows\Sysnative\nbtstat.exe</b></span></td>
</tr>
</tbody>
</table>

The file path above will give you access to the 64-bit nbtstat</b> tool from a 32-bit application or from a 32-bit script. We recommend you to read this article / blog post</span></u></a> (at Scottie’s Tech.Info) to get more details about this.</span>

Supported by Windows Vista and later</span></b>
</span>  </span>
</span></span>The virtual Sysnative</b> folder is supported by Windows Vista and later. So it works also with Windows 7 and Windows 8, but not with Windows XP (unless a special
hotfix</span></u></a> from Microsoft is installed). The Sysnative</b> folder is also available on Windows Server 2008 and Windows Server 2012.
</span>
</span>The Sysnative</b> folder is only available in a 64-bit Windows. A 32-bit Windows does not have any Sysnative</b> folder. Instead, accessing files in the 32-bit system folder is very easy and intuitive; the System32</b> folder name can be used in the folder path, for example: C:\Windows\System32</b>.</span>

 

Using Sysnative with the %windir% environment variable</b>
</span>  </span>
</span>As default, Windows is installed to the C:\Windows</b> folder on a user’s hard disk. But there is no guarantee for that. Sometimes Windows can be installed to a different folder, or also to a different drive letter. To handle situations like this, in safe way, it is recommended to include the %windir%</b> environment variable when you want to create a path to the Sysnative</b> folder. Example: %windir%\Sysnative</b>. Or, as an alternative, if your programming language and environment allows it, you can call the GetWindowsDirectory</b> Windows API function to get the current Windows folder path in the computer, and combine it with the Sysnative</b> folder name.</span></td>
</tr>
</tbody>
</table>
 

More information</span></b>
</span>  </span>
</span>We recommend you to also read this article on Microsoft's website:
</span>
</span>Windows Dev Center: File System Redirector</span></u></a>
</span>