Commit 9cc4b0ca authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

msi/tests: Don't create a nested restore point on recent versions of MSI.

We now set the MSIFASTINSTALL property which disables restore points.
parent 5d0a6b00
...@@ -42,6 +42,8 @@ static UINT (WINAPI *pMsiSourceListEnumSourcesA) ...@@ -42,6 +42,8 @@ static UINT (WINAPI *pMsiSourceListEnumSourcesA)
(LPCSTR, LPCSTR, MSIINSTALLCONTEXT, DWORD, DWORD, LPSTR, LPDWORD); (LPCSTR, LPCSTR, MSIINSTALLCONTEXT, DWORD, DWORD, LPSTR, LPDWORD);
static UINT (WINAPI *pMsiSourceListGetInfoA) static UINT (WINAPI *pMsiSourceListGetInfoA)
(LPCSTR, LPCSTR, MSIINSTALLCONTEXT, DWORD, LPCSTR, LPSTR, LPDWORD); (LPCSTR, LPCSTR, MSIINSTALLCONTEXT, DWORD, LPCSTR, LPSTR, LPDWORD);
static INSTALLSTATE (WINAPI *pMsiGetComponentPathExA)
(LPCSTR, LPCSTR, LPCSTR, MSIINSTALLCONTEXT, LPSTR, LPDWORD);
static BOOL (WINAPI *pConvertSidToStringSidA)(PSID, LPSTR*); static BOOL (WINAPI *pConvertSidToStringSidA)(PSID, LPSTR*);
static BOOL (WINAPI *pGetTokenInformation)( HANDLE, TOKEN_INFORMATION_CLASS, LPVOID, DWORD, PDWORD ); static BOOL (WINAPI *pGetTokenInformation)( HANDLE, TOKEN_INFORMATION_CLASS, LPVOID, DWORD, PDWORD );
...@@ -3266,6 +3268,7 @@ static void init_functionpointers(void) ...@@ -3266,6 +3268,7 @@ static void init_functionpointers(void)
GET_PROC(hmsi, MsiSetExternalUIRecord); GET_PROC(hmsi, MsiSetExternalUIRecord);
GET_PROC(hmsi, MsiSourceListEnumSourcesA); GET_PROC(hmsi, MsiSourceListEnumSourcesA);
GET_PROC(hmsi, MsiSourceListGetInfoA); GET_PROC(hmsi, MsiSourceListGetInfoA);
GET_PROC(hmsi, MsiGetComponentPathExA);
GET_PROC(hadvapi32, ConvertSidToStringSidA); GET_PROC(hadvapi32, ConvertSidToStringSidA);
GET_PROC(hadvapi32, GetTokenInformation); GET_PROC(hadvapi32, GetTokenInformation);
...@@ -10955,8 +10958,11 @@ START_TEST(install) ...@@ -10955,8 +10958,11 @@ START_TEST(install)
/* Create a restore point ourselves so we circumvent the multitude of restore points /* Create a restore point ourselves so we circumvent the multitude of restore points
* that would have been created by all the installation and removal tests. * that would have been created by all the installation and removal tests.
*
* This is not needed on version 5.0 where setting MSIFASTINSTALL prevents the
* creation of restore points.
*/ */
if (pSRSetRestorePointA) if (pSRSetRestorePointA && !pMsiGetComponentPathExA)
{ {
memset(&status, 0, sizeof(status)); memset(&status, 0, sizeof(status));
ret = notify_system_change(BEGIN_NESTED_SYSTEM_CHANGE, &status); ret = notify_system_change(BEGIN_NESTED_SYSTEM_CHANGE, &status);
...@@ -11046,7 +11052,7 @@ START_TEST(install) ...@@ -11046,7 +11052,7 @@ START_TEST(install)
DeleteFileA(log_file); DeleteFileA(log_file);
if (pSRSetRestorePointA && ret) if (pSRSetRestorePointA && !pMsiGetComponentPathExA && ret)
{ {
ret = notify_system_change(END_NESTED_SYSTEM_CHANGE, &status); ret = notify_system_change(END_NESTED_SYSTEM_CHANGE, &status);
if (ret) if (ret)
......
...@@ -36,6 +36,7 @@ static const char msifile[] = "winetest-package.msi"; ...@@ -36,6 +36,7 @@ static const char msifile[] = "winetest-package.msi";
static char CURR_DIR[MAX_PATH]; static char CURR_DIR[MAX_PATH];
static UINT (WINAPI *pMsiApplyMultiplePatchesA)(LPCSTR, LPCSTR, LPCSTR); static UINT (WINAPI *pMsiApplyMultiplePatchesA)(LPCSTR, LPCSTR, LPCSTR);
static INSTALLSTATE (WINAPI *pMsiGetComponentPathExA)(LPCSTR, LPCSTR, LPCSTR, MSIINSTALLCONTEXT, LPSTR, LPDWORD);
static HRESULT (WINAPI *pSHGetFolderPathA)(HWND, int, HANDLE, DWORD, LPSTR); static HRESULT (WINAPI *pSHGetFolderPathA)(HWND, int, HANDLE, DWORD, LPSTR);
static BOOL (WINAPI *pConvertSidToStringSidA)(PSID, LPSTR*); static BOOL (WINAPI *pConvertSidToStringSidA)(PSID, LPSTR*);
...@@ -62,6 +63,7 @@ static void init_functionpointers(void) ...@@ -62,6 +63,7 @@ static void init_functionpointers(void)
p ## func = (void*)GetProcAddress(mod, #func); p ## func = (void*)GetProcAddress(mod, #func);
GET_PROC(hmsi, MsiApplyMultiplePatchesA); GET_PROC(hmsi, MsiApplyMultiplePatchesA);
GET_PROC(hmsi, MsiGetComponentPathExA);
GET_PROC(hshell32, SHGetFolderPathA); GET_PROC(hshell32, SHGetFolderPathA);
GET_PROC(hadvapi32, ConvertSidToStringSidA); GET_PROC(hadvapi32, ConvertSidToStringSidA);
...@@ -12829,8 +12831,11 @@ START_TEST(package) ...@@ -12829,8 +12831,11 @@ START_TEST(package)
/* Create a restore point ourselves so we circumvent the multitude of restore points /* Create a restore point ourselves so we circumvent the multitude of restore points
* that would have been created by all the installation and removal tests. * that would have been created by all the installation and removal tests.
*
* This is not needed on version 5.0 where setting MSIFASTINSTALL prevents the
* creation of restore points.
*/ */
if (pSRSetRestorePointA) if (pSRSetRestorePointA && !pMsiGetComponentPathExA)
{ {
memset(&status, 0, sizeof(status)); memset(&status, 0, sizeof(status));
ret = notify_system_change(BEGIN_NESTED_SYSTEM_CHANGE, &status); ret = notify_system_change(BEGIN_NESTED_SYSTEM_CHANGE, &status);
...@@ -12868,7 +12873,7 @@ START_TEST(package) ...@@ -12868,7 +12873,7 @@ START_TEST(package)
test_MsiApplyMultiplePatches(); test_MsiApplyMultiplePatches();
test_MsiApplyPatch(); test_MsiApplyPatch();
if (pSRSetRestorePointA && ret) if (pSRSetRestorePointA && !pMsiGetComponentPathExA && ret)
{ {
ret = notify_system_change(END_NESTED_SYSTEM_CHANGE, &status); ret = notify_system_change(END_NESTED_SYSTEM_CHANGE, &status);
if (ret) if (ret)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment