From 3137001772032ca0720bbdef9be5a47e96d15b9f Mon Sep 17 00:00:00 2001 From: Shiqing Fan Date: Wed, 13 May 2009 15:56:37 +0000 Subject: [PATCH] Read from the correct registry entry on Windows Vista and Server 2008. This commit was SVN r21224. --- opal/mca/installdirs/windows/opal_installdirs_windows.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opal/mca/installdirs/windows/opal_installdirs_windows.c b/opal/mca/installdirs/windows/opal_installdirs_windows.c index 75ab1d2784..40d00cf5d6 100644 --- a/opal/mca/installdirs/windows/opal_installdirs_windows.c +++ b/opal/mca/installdirs/windows/opal_installdirs_windows.c @@ -75,7 +75,10 @@ installdirs_windows_open(void) * All others can be composed starting from OPAL_PREFIX. */ if( ERROR_SUCCESS != RegOpenKeyEx( HKEY_LOCAL_MACHINE, "Software\\Open MPI", 0, KEY_READ, &ompi_key) ) - return 0; + /* Windows Vista and Server 2008 handles its registry differently, + also need to check Wow6432Node. */ + if( ERROR_SUCCESS != RegOpenKeyEx( HKEY_LOCAL_MACHINE, "Software\\Wow6432Node\\Open MPI", 0, KEY_READ, &ompi_key) ) + return 0; SET_FIELD(ompi_key, prefix, "OPAL_PREFIX"); SET_FIELD(ompi_key, exec_prefix, "OPAL_EXEC_PREFIX");