Skip to content

Commit e0bf393

Browse files
winesynclearn-more
authored andcommitted
[WINESYNC] msi/tests: Test deferral of RegisterProduct.
Signed-off-by: Zebediah Figura <[email protected]> Signed-off-by: Hans Leidekker <[email protected]> Signed-off-by: Alexandre Julliard <[email protected]> wine commit id 71f3f2a6edf8db909a756d25d2acf96ef9258dbc by Zebediah Figura <[email protected]>
1 parent 742877d commit e0bf393

File tree

3 files changed

+34
-0
lines changed

3 files changed

+34
-0
lines changed

modules/rostests/winetests/msi/action.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,8 @@ static const char pp_install_exec_seq_dat[] =
405405
"InstallFiles\t\t4000\n"
406406
"RegisterUser\tREGISTER_USER=1 Or FULL=1\t6000\n"
407407
"RegisterProduct\tREGISTER_PRODUCT=1 Or FULL=1\t6100\n"
408+
"rp_immediate\tREGISTER_PRODUCT AND ALLUSERS\t6101\n"
409+
"rp_deferred\tREGISTER_PRODUCT AND ALLUSERS\t6102\n"
408410
"PublishFeatures\tPUBLISH_FEATURES=1 Or FULL=1\t6300\n"
409411
"pf_immediate\tPUBLISH_FEATURES AND ALLUSERS\t6301\n"
410412
"pf_deferred\tPUBLISH_FEATURES AND ALLUSERS\t6302\n"
@@ -423,6 +425,8 @@ static const char pp_custom_action_dat[] =
423425
"uf_deferred\t1025\tcustom.dll\tpf_absent\n"
424426
"pp_immediate\t1\tcustom.dll\tpp_absent\n"
425427
"pp_deferred\t1025\tcustom.dll\tpp_present\n"
428+
"rp_immediate\t1\tcustom.dll\trp_absent\n"
429+
"rp_deferred\t1025\tcustom.dll\trp_present\n"
426430
"ppc_immediate\t1\tcustom.dll\tppc_absent\n"
427431
"ppc_deferred\t1025\tcustom.dll\tppc_present\n";
428432

modules/rostests/winetests/msi/custom.c

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1698,3 +1698,31 @@ todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))
16981698

16991699
return ERROR_SUCCESS;
17001700
}
1701+
1702+
static const char rp_key[] = "Software\\Microsoft\\Windows\\CurrentVersion\\"
1703+
"Uninstall\\{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}";
1704+
1705+
UINT WINAPI rp_present(MSIHANDLE hinst)
1706+
{
1707+
HKEY key;
1708+
LONG res;
1709+
1710+
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, rp_key, 0, KEY_READ | KEY_WOW64_32KEY, &key);
1711+
ok(hinst, !res, "got %u\n", res);
1712+
check_reg_str(hinst, key, "DisplayName", "MSITEST");
1713+
RegCloseKey(key);
1714+
1715+
return ERROR_SUCCESS;
1716+
}
1717+
1718+
UINT WINAPI rp_absent(MSIHANDLE hinst)
1719+
{
1720+
HKEY key;
1721+
LONG res;
1722+
1723+
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, rp_key, 0, KEY_READ | KEY_WOW64_32KEY, &key);
1724+
todo_wine
1725+
ok(hinst, res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
1726+
1727+
return ERROR_SUCCESS;
1728+
}

modules/rostests/winetests/msi/custom.spec

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333
@ stdcall rmi_absent(long)
3434
@ stdcall rd_present(long)
3535
@ stdcall rd_absent(long)
36+
@ stdcall rp_present(long)
37+
@ stdcall rp_absent(long)
3638
@ stdcall sds_present(long)
3739
@ stdcall sds_absent(long)
3840
@ stdcall sis_present(long)

0 commit comments

Comments
 (0)