msi/tests: Test deferral of PublishProduct.

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>
oldstable
Zebediah Figura 2018-05-24 19:14:14 -05:00 committed by Alexandre Julliard
parent 920dde0b1e
commit 4f2bb46fd1
3 changed files with 35 additions and 0 deletions

View File

@ -409,6 +409,8 @@ static const char pp_install_exec_seq_dat[] =
"pf_immediate\tPUBLISH_FEATURES AND ALLUSERS\t6301\n"
"pf_deferred\tPUBLISH_FEATURES AND ALLUSERS\t6302\n"
"PublishProduct\tPUBLISH_PRODUCT=1 Or FULL=1\t6400\n"
"pp_immediate\tPUBLISH_PRODUCT AND ALLUSERS\t6401\n"
"pp_deferred\tPUBLISH_PRODUCT AND ALLUSERS\t6402\n"
"InstallFinalize\t\t6600";
static const char pp_custom_action_dat[] =
@ -419,6 +421,8 @@ static const char pp_custom_action_dat[] =
"pf_deferred\t1025\tcustom.dll\tpf_present\n"
"uf_immediate\t1\tcustom.dll\tpf_present\n"
"uf_deferred\t1025\tcustom.dll\tpf_absent\n"
"pp_immediate\t1\tcustom.dll\tpp_absent\n"
"pp_deferred\t1025\tcustom.dll\tpp_present\n"
"ppc_immediate\t1\tcustom.dll\tppc_absent\n"
"ppc_deferred\t1025\tcustom.dll\tppc_present\n";

View File

@ -1536,3 +1536,32 @@ todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))
return ERROR_SUCCESS;
}
static const char pp_prodkey[] = "Installer\\Products\\84A88FD7F6998CE40A22FB59F6B9C2BB";
UINT WINAPI pp_present(MSIHANDLE hinst)
{
HKEY key;
LONG res;
res = RegOpenKeyExA(HKEY_CLASSES_ROOT, pp_prodkey, 0, KEY_READ | KEY_WOW64_64KEY, &key);
ok(hinst, !res, "got %u\n", res);
check_reg_str(hinst, key, "ProductName", "MSITEST");
check_reg_str(hinst, key, "PackageCode", "AC75740029052C94DA02821EECD05F2F");
check_reg_str(hinst, key, "Clients", ":");
RegCloseKey(key);
return ERROR_SUCCESS;
}
UINT WINAPI pp_absent(MSIHANDLE hinst)
{
HKEY key;
LONG res;
res = RegOpenKeyExA(HKEY_CLASSES_ROOT, pp_prodkey, 0, KEY_READ | KEY_WOW64_64KEY, &key);
todo_wine
ok(hinst, res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
return ERROR_SUCCESS;
}

View File

@ -17,6 +17,8 @@
@ stdcall pa_absent(long)
@ stdcall pf_present(long)
@ stdcall pf_absent(long)
@ stdcall pp_present(long)
@ stdcall pp_absent(long)
@ stdcall ppc_present(long)
@ stdcall ppc_absent(long)
@ stdcall pub_present(long)