Tuesday, July 05, 2011

File System Redirection - How to target the real system32 directory

"32-bit applications can access the native system directory by substituting %windir%\Sysnative for %windir%\System32. WOW64 recognizes Sysnative as a special alias used to indicate that the file system should not redirect the access. This mechanism is flexible and easy to use, therefore, it is the recommended mechanism to bypass file system redirection. Note that 64-bit applications cannot use the Sysnative alias as it is a virtual directory not a real one."

The above is correct.. in your scripts just make sure your target "%windir%\Sysnative" and your file will go where you intended it to go. 


  1. HELP!! I am trying to copy some files to the 64bits-system32 directory, from a c++ program. What I do, is a xcopy command to %windir%\systenative but it does not work.
    The weird part is that if create the folder c:\windows\sysnative, then, the xcopy will work just fine, and will put the files in the right directory: 64bit-system32 (the manually-created c:\windows\sysnative will just remain empty but I needed to make the xcopy works)
    What´s going on here? is it a windows bug, or I am doing something wrong. I just do not see, creating a empty, useless c:\windows\sysnative directory as the right solution to my problem

  2. Are you calling Xcopy.exe from the 64 bit folder or the 32bit version? If calling it from the 64bit version I suspect this is why can't copy the file to system32 directory. Also why not use the programming of C++ to copy the files instead of using X copy (http://www.daniweb.com/software-development/cpp/threads/154891)