msi/tests: Test deferral of ProcessComponents.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2018-05-24 19:14:11 -05:00 committed by Alexandre Julliard
parent 6eb7440914
commit 5e0e25d4b4
3 changed files with 44 additions and 0 deletions

View File

@ -396,6 +396,8 @@ static const char pp_install_exec_seq_dat[] =
"InstallValidate\t\t1400\n"
"InstallInitialize\t\t1500\n"
"ProcessComponents\tPROCESS_COMPONENTS=1 Or FULL=1\t1600\n"
"ppc_immediate\tPROCESS_COMPONENTS AND ALLUSERS\t1601\n"
"ppc_deferred\tPROCESS_COMPONENTS AND ALLUSERS\t1602\n"
"UnpublishFeatures\tUNPUBLISH_FEATURES=1 Or FULL=1\t1800\n"
"RemoveFiles\t\t3500\n"
"InstallFiles\t\t4000\n"
@ -405,6 +407,13 @@ static const char pp_install_exec_seq_dat[] =
"PublishProduct\tPUBLISH_PRODUCT=1 Or FULL=1\t6400\n"
"InstallFinalize\t\t6600";
static const char pp_custom_action_dat[] =
"Action\tType\tSource\tTarget\n"
"s72\ti2\tS64\tS0\n"
"CustomAction\tAction\n"
"ppc_immediate\t1\tcustom.dll\tppc_absent\n"
"ppc_deferred\t1025\tcustom.dll\tppc_present\n";
static const char pp_component_dat[] =
"Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
"s72\tS38\ts72\ti2\tS255\tS72\n"
@ -1855,6 +1864,7 @@ static const msi_table ppc_tables[] =
ADD_TABLE(ppc_feature_comp),
ADD_TABLE(ppc_file),
ADD_TABLE(pp_install_exec_seq),
ADD_TABLE(pp_custom_action),
ADD_TABLE(ppc_media),
ADD_TABLE(property),
};

View File

@ -1434,3 +1434,35 @@ todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
}
return ERROR_SUCCESS;
}
static const char ppc_key[] = "Software\\Microsoft\\Windows\\CurrentVersion\\"
"Installer\\UserData\\S-1-5-18\\Components\\CBABC2FDCCB35E749A8944D8C1C098B5";
UINT WINAPI ppc_present(MSIHANDLE hinst)
{
char expect[MAX_PATH];
HKEY key;
UINT r;
r = RegOpenKeyExA(HKEY_LOCAL_MACHINE, ppc_key, 0, KEY_QUERY_VALUE | KEY_WOW64_64KEY, &key);
ok(hinst, !r, "got %u\n", r);
if (FAILED(SHGetFolderPathA(NULL, CSIDL_PROGRAM_FILESX86, NULL, 0, expect)))
SHGetFolderPathA(NULL, CSIDL_PROGRAM_FILES, NULL, 0, expect);
strcat(expect, "\\msitest\\maximus");
check_reg_str(hinst, key, "84A88FD7F6998CE40A22FB59F6B9C2BB", expect);
RegCloseKey(key);
return ERROR_SUCCESS;
}
UINT WINAPI ppc_absent(MSIHANDLE hinst)
{
HKEY key;
UINT r;
r = RegOpenKeyExA(HKEY_LOCAL_MACHINE, ppc_key, 0, KEY_QUERY_VALUE | KEY_WOW64_64KEY, &key);
todo_wine
ok(hinst, r == ERROR_FILE_NOT_FOUND, "got %u\n", r);
return ERROR_SUCCESS;
}

View File

@ -15,6 +15,8 @@
@ stdcall odbc_absent(long)
@ stdcall pa_present(long)
@ stdcall pa_absent(long)
@ stdcall ppc_present(long)
@ stdcall ppc_absent(long)
@ stdcall rd_present(long)
@ stdcall rd_absent(long)
@ stdcall sds_present(long)