mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 20:59:54 +00:00
msi: Handle the INSTALLSTATE_ABSENT state in MsiConfigureProductEx.
This commit is contained in:
parent
9518d7f8c7
commit
0b240c7aa3
@ -373,9 +373,12 @@ UINT WINAPI MsiConfigureProductExW(LPCWSTR szProduct, int iInstallLevel,
|
||||
DWORD sz;
|
||||
WCHAR sourcepath[MAX_PATH];
|
||||
WCHAR filename[MAX_PATH];
|
||||
LPWSTR commandline;
|
||||
|
||||
static const WCHAR szInstalled[] = {
|
||||
' ','I','n','s','t','a','l','l','e','d','=','1',0};
|
||||
LPWSTR commandline;
|
||||
static const WCHAR szRemoveAll[] = {
|
||||
' ','R','E','M','O','V','E','=','A','L','L',0};
|
||||
|
||||
TRACE("%s %d %d %s\n",debugstr_w(szProduct), iInstallLevel, eInstallState,
|
||||
debugstr_w(szCommandLine));
|
||||
@ -383,10 +386,10 @@ UINT WINAPI MsiConfigureProductExW(LPCWSTR szProduct, int iInstallLevel,
|
||||
if (!szProduct || lstrlenW(szProduct) != GUID_SIZE - 1)
|
||||
return ERROR_INVALID_PARAMETER;
|
||||
|
||||
if (eInstallState != INSTALLSTATE_LOCAL &&
|
||||
eInstallState != INSTALLSTATE_DEFAULT)
|
||||
if (eInstallState == INSTALLSTATE_ADVERTISED ||
|
||||
eInstallState == INSTALLSTATE_SOURCE)
|
||||
{
|
||||
FIXME("Not implemented for anything other than local installs\n");
|
||||
FIXME("State %d not implemented\n", eInstallState);
|
||||
return ERROR_CALL_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
@ -415,6 +418,9 @@ UINT WINAPI MsiConfigureProductExW(LPCWSTR szProduct, int iInstallLevel,
|
||||
if (szCommandLine)
|
||||
sz += lstrlenW(szCommandLine);
|
||||
|
||||
if (eInstallState == INSTALLSTATE_ABSENT)
|
||||
sz += lstrlenW(szRemoveAll);
|
||||
|
||||
commandline = msi_alloc(sz * sizeof(WCHAR));
|
||||
if (!commandline)
|
||||
{
|
||||
@ -429,6 +435,9 @@ UINT WINAPI MsiConfigureProductExW(LPCWSTR szProduct, int iInstallLevel,
|
||||
if (MsiQueryProductStateW(szProduct) != INSTALLSTATE_UNKNOWN)
|
||||
lstrcatW(commandline,szInstalled);
|
||||
|
||||
if (eInstallState == INSTALLSTATE_ABSENT)
|
||||
lstrcatW(commandline, szRemoveAll);
|
||||
|
||||
r = MSI_InstallPackage( package, sourcepath, commandline );
|
||||
|
||||
msi_free(commandline);
|
||||
|
Loading…
Reference in New Issue
Block a user