Windows 64-bit registry v.s. 32-bit registry

后端 未结 6 1163
逝去的感伤
逝去的感伤 2020-11-27 02:44

I heard on Windows x64 architecture, in order to support to run both x86 and x64 application, there is two separate/different sets of Windows registry -- one for x86 applica

6条回答
  •  温柔的废话
    2020-11-27 02:57

    I ran into this issue not long ago. The short answer is that if you run a 32 bit application on a 64 bit machine then it's registry keys are located under a Wow6432Node.

    For example, let's say you have an application that stores its registry information under:

    HKEY_LOCAL_MACHINE\SOFTWARE\CompanyX
    

    If you compile your application as a 64 bit binary and run it on a 64 bit machine then the registry keys are in the location above. However, if you compile your application as a 32 bit binary and run it on a 64 bit machine then your registry information is now located here:

    HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\CompanyX
    

    This means that if you run both the 32 bit and 64 bit versions of your application on the same machine then they will each be looking at a different set of registry keys.

提交回复
热议问题