msi: Support all install contexts in MsiReinstallFeatureW.
This commit is contained in:
parent
973e86b844
commit
00477d601e
|
@ -3773,18 +3773,20 @@ UINT WINAPI MsiGetShortcutTargetW( LPCWSTR szShortcutTarget,
|
||||||
UINT WINAPI MsiReinstallFeatureW( LPCWSTR szProduct, LPCWSTR szFeature,
|
UINT WINAPI MsiReinstallFeatureW( LPCWSTR szProduct, LPCWSTR szFeature,
|
||||||
DWORD dwReinstallMode )
|
DWORD dwReinstallMode )
|
||||||
{
|
{
|
||||||
MSIPACKAGE* package = NULL;
|
static const WCHAR szLogVerbose[] =
|
||||||
|
{' ','L','O','G','V','E','R','B','O','S','E',0};
|
||||||
|
MSIPACKAGE *package;
|
||||||
|
MSIINSTALLCONTEXT context;
|
||||||
UINT r;
|
UINT r;
|
||||||
WCHAR sourcepath[MAX_PATH];
|
WCHAR sourcepath[MAX_PATH], filename[MAX_PATH], reinstallmode[11];
|
||||||
WCHAR filename[MAX_PATH];
|
|
||||||
static const WCHAR szLogVerbose[] = {
|
|
||||||
' ','L','O','G','V','E','R','B','O','S','E',0 };
|
|
||||||
WCHAR reinstallmode[11];
|
|
||||||
LPWSTR ptr;
|
LPWSTR ptr;
|
||||||
DWORD sz;
|
DWORD sz;
|
||||||
|
|
||||||
FIXME("%s %s 0x%08x\n",
|
TRACE("%s, %s, 0x%08x\n", debugstr_w(szProduct), debugstr_w(szFeature), dwReinstallMode);
|
||||||
debugstr_w(szProduct), debugstr_w(szFeature), dwReinstallMode);
|
|
||||||
|
r = msi_locate_product( szProduct, &context );
|
||||||
|
if (r != ERROR_SUCCESS)
|
||||||
|
return r;
|
||||||
|
|
||||||
ptr = reinstallmode;
|
ptr = reinstallmode;
|
||||||
|
|
||||||
|
@ -3811,12 +3813,12 @@ UINT WINAPI MsiReinstallFeatureW( LPCWSTR szProduct, LPCWSTR szFeature,
|
||||||
*ptr = 0;
|
*ptr = 0;
|
||||||
|
|
||||||
sz = sizeof(sourcepath);
|
sz = sizeof(sourcepath);
|
||||||
MsiSourceListGetInfoW(szProduct, NULL, MSIINSTALLCONTEXT_USERUNMANAGED,
|
MsiSourceListGetInfoW( szProduct, NULL, context, MSICODE_PRODUCT,
|
||||||
MSICODE_PRODUCT, INSTALLPROPERTY_LASTUSEDSOURCEW, sourcepath, &sz);
|
INSTALLPROPERTY_LASTUSEDSOURCEW, sourcepath, &sz );
|
||||||
|
|
||||||
sz = sizeof(filename);
|
sz = sizeof(filename);
|
||||||
MsiSourceListGetInfoW(szProduct, NULL, MSIINSTALLCONTEXT_USERUNMANAGED,
|
MsiSourceListGetInfoW( szProduct, NULL, context, MSICODE_PRODUCT,
|
||||||
MSICODE_PRODUCT, INSTALLPROPERTY_PACKAGENAMEW, filename, &sz);
|
INSTALLPROPERTY_PACKAGENAMEW, filename, &sz );
|
||||||
|
|
||||||
lstrcatW( sourcepath, filename );
|
lstrcatW( sourcepath, filename );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue