From b98ef8f087c0c4a75af6dcf6cb214f5e976594ab Mon Sep 17 00:00:00 2001 From: Hans Leidekker Date: Tue, 7 May 2013 15:00:55 +0200 Subject: [PATCH] msi: Treat an empty install location as missing. --- dlls/msi/action.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index 827a0c86012..cf03fa2d49b 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -2305,9 +2305,12 @@ static WCHAR *get_install_location( MSIPACKAGE *package ) WCHAR *path; if (!package->ProductCode) return NULL; - if (MSIREG_OpenInstallProps( package->ProductCode, package->Context, NULL, &hkey, FALSE )) - return NULL; - path = msi_reg_get_val_str( hkey, szInstallLocation ); + if (MSIREG_OpenInstallProps( package->ProductCode, package->Context, NULL, &hkey, FALSE )) return NULL; + if ((path = msi_reg_get_val_str( hkey, szInstallLocation )) && !path[0]) + { + msi_free( path ); + path = NULL; + } RegCloseKey( hkey ); return path; }