msi: Treat an empty install location as missing.
This commit is contained in:
parent
6a7bf66b29
commit
b98ef8f087
|
@ -2305,9 +2305,12 @@ static WCHAR *get_install_location( MSIPACKAGE *package )
|
||||||
WCHAR *path;
|
WCHAR *path;
|
||||||
|
|
||||||
if (!package->ProductCode) return NULL;
|
if (!package->ProductCode) return NULL;
|
||||||
if (MSIREG_OpenInstallProps( package->ProductCode, package->Context, NULL, &hkey, FALSE ))
|
if (MSIREG_OpenInstallProps( package->ProductCode, package->Context, NULL, &hkey, FALSE )) return NULL;
|
||||||
return NULL;
|
if ((path = msi_reg_get_val_str( hkey, szInstallLocation )) && !path[0])
|
||||||
path = msi_reg_get_val_str( hkey, szInstallLocation );
|
{
|
||||||
|
msi_free( path );
|
||||||
|
path = NULL;
|
||||||
|
}
|
||||||
RegCloseKey( hkey );
|
RegCloseKey( hkey );
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue