Why REG.EXE from SysWOW64 doesn't return the same output as the REG.EXE in SYSTEM32 RRS feed

  • Question

  • Hi,

    I am using an application that is compiling a BATCH into an EXE.

    The problem is that this compilation makes the EXE to use the REG.EXE that is in SYSWOW64 folder and not the one that is in System32.

    Why when I execute the REG from one directory or another one, I dont have the same output ? Some registry entries are not visible when using the REG.Exe located in Syswow64.

    I tried to enforce the full path of the reg.exe that I wanted to use in my script but it didn't work.

    Can I copy the reg.exe from Windows directly to my script and execute it on different windows platform ? 

    Otherwise is there any other standalone EXE that I can use to query the registry to find a specific value ?

    Thank you

    Thursday, May 7, 2015 8:04 AM


  • Hi isabelle94000,

    This seems to be related to the File System Redirector.
    Here is a link for reference:
    File System Redirector

    "The %windir%\System32 directory is reserved for 64-bit applications. Most DLL file names were not changed when 64-bit versions of the DLLs were created, so 32-bit versions of the DLLs are stored in a different directory. WOW64 hides this difference by using a file system redirector.
    In most cases, whenever a 32-bit application attempts to access %windir%\System32, the access is redirected to %windir%\SysWOW64. Access to %windir%\lastgood\system32 is redirected to %windir%\lastgood\SysWOW64. Access to %windir%\regedit.exe is redirected to %windir%\SysWOW64\regedit.exe. "

    Best regards

    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    • Proposed as answer by Deason Wu Tuesday, May 19, 2015 8:37 AM
    • Marked as answer by Deason Wu Thursday, May 21, 2015 7:42 AM
    Friday, May 8, 2015 7:10 AM