We have an legacy application that accesses the registry. Because it is a 32bit application it accesses the registry in Windows 7 through Registry Virtualization when referencing HKEY_LOCAL_MACHINE\Software. My question is what setting(s) in Visual Studio do we need to modify to compile our applications where they access the registry "normally" without going through Registry Virtualization?
How to build a x64, Windows 7 compatible application?
649 views Asked by Achilles At
3
There are 3 answers
2
On
If you read the Registry Virtualization page closely, you will notice that the virtualization is not limited to 64-bit Windows. It only states that only 32-bit processes will be virtualized. But the virtualization is done on both 32- and 64-bit Vista and later. So the question title and the x64 tag are a bit misleading.
To answer your question, the same page says this: "Registry virtualization is disabled for the following: ... Processes that have requestedExecutionLevel specified in their manifests."
So you can disable the virtualization by adding a manifest file to your executable that specifies its execution level. There is at least a Microsoft KB article for how to do it in Visual Studio 2005: http://support.microsoft.com/kb/944276.
The solution was to compile the legacy application to target x64. An application that is explicitly targeting x64 will not be subject to registry virtualization.