What is the 'Sysnative' folder ?
With the release of Windows 7 of 64-bits, there was a little change introduced in the normal allocation of folders in the Windows directory. Two new folders are included in the 64-bit edition of Windows 7, Windows 8 and Windows 10. They are Sysnative and SysWOW64 folders. This is only in 64-bit Windows. If you run a 32-bit Windows on a 64-bit machine, you won’t see them. Neither will you see them when running 32-bit Windows on a 32-bit machine.
In a 64-bit Windows the System32 folder is intended for 64-bit binary files (DLL files etc.) and the SysWOW64 folder is intended for 32-bit binary files. If a 32-bit application includes the "\System32" folder name in a folder path, the system automatically makes a redirection to the SysWOW64 folder. This is to prevent compatibility problems when applications are compiled to 64-bit executables.
But if a 32-bit application really needs access to the 64-bit System32 folder in a 64-bit Windows; is it possible?
Well, accessing the 64-bit System32 folder from a 32-bit application by simply inserting "\System32" in the folder path is not possible. As mentioned above, a redirection to the SysWOW64 folder is made automatically by the system if you try that. But there is another folder name that can be used instead: Sysnative.
Sysnative is a virtual folder, a special alias, that can be used to access the 64-bit System32 folder from a 32-bit application or script. If you for example specify this folder path in your application's source code:
C:\Windows\Sysnative
the following folder path is actually used:
C:\Windows\System32
Using the 'Sysnative' folder will help you access 64-bit tools from 32-bit code.
An example:
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 folder.
One example is the nbtstat tool that is used to help troubleshoot NetBIOS name resolution problems. If you try to run the nbtstat tool from 32-bit code (for example from an application or from script) and use a path like C:\Windows\System32, you will get a "File not found" error. The file can not be found; although Windows Explorer shows that the nbtstat program file actually is located in the C:\Windows\System32 folder.
The solution is to include the virtual Sysnative folder in the folder path when you want to run the tool (from your 32 bit program/script):
C:\Windows\Sysnative\nbtstat.exe