I have been facing a problem in InstallScript to get the list of registry keys for 32- and 64-bit installations.
My machine is Windows Server 2008 64-bit. I can install the SQL Server 2008 32-bit version or 64-bit version on this machine.
Now during the setup I need to know whether either of the SQL Server versions are installed.
As per my understanding,
- 64-bit applications on 64-bit machine are stored in
Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall
. - 32-bit applications on 64-bit machine are stored in
Software\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall
.
I have written a function which should search both these locations for SQL Server installation using the RegDBQueryKey
function.
Even if I pass "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall"
to RegDBQueryKey
, it lists the keys of Software\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall
.
Can anyone help me with this issue?