Skip to content

Commit b493df6

Browse files
winesynclearn-more
authored andcommitted
[WINESYNC] msi/tests: Test deferral of RegisterUser.
Signed-off-by: Zebediah Figura <[email protected]> Signed-off-by: Hans Leidekker <[email protected]> Signed-off-by: Alexandre Julliard <[email protected]> wine commit id d0ab6deb773912b427251f041e7413669fdef702 by Zebediah Figura <[email protected]>
1 parent d6a9b26 commit b493df6

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
@@ -404,6 +404,8 @@ static const char pp_install_exec_seq_dat[] =
404404
"RemoveFiles\t\t3500\n"
405405
"InstallFiles\t\t4000\n"
406406
"RegisterUser\tREGISTER_USER=1 Or FULL=1\t6000\n"
407+
"ru_immediate\tREGISTER_USER AND ALLUSERS\t6001\n"
408+
"ru_deferred\tREGISTER_USER AND ALLUSERS\t6002\n"
407409
"RegisterProduct\tREGISTER_PRODUCT=1 Or FULL=1\t6100\n"
408410
"rp_immediate\tREGISTER_PRODUCT AND ALLUSERS\t6101\n"
409411
"rp_deferred\tREGISTER_PRODUCT AND ALLUSERS\t6102\n"
@@ -427,6 +429,8 @@ static const char pp_custom_action_dat[] =
427429
"pp_deferred\t1025\tcustom.dll\tpp_present\n"
428430
"rp_immediate\t1\tcustom.dll\trp_absent\n"
429431
"rp_deferred\t1025\tcustom.dll\trp_present\n"
432+
"ru_immediate\t1\tcustom.dll\tru_absent\n"
433+
"ru_deferred\t1025\tcustom.dll\tru_present\n"
430434
"ppc_immediate\t1\tcustom.dll\tppc_absent\n"
431435
"ppc_deferred\t1025\tcustom.dll\tppc_present\n";
432436

modules/rostests/winetests/msi/custom.c

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

17771777
return ERROR_SUCCESS;
17781778
}
1779+
1780+
static const CHAR ru_key[] = "Software\\Microsoft\\Windows\\CurrentVersion\\Installer"
1781+
"\\UserData\\S-1-5-18\\Products\\84A88FD7F6998CE40A22FB59F6B9C2BB\\InstallProperties";
1782+
1783+
UINT WINAPI ru_present(MSIHANDLE hinst)
1784+
{
1785+
HKEY key;
1786+
LONG res;
1787+
1788+
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, ru_key, 0, KEY_READ | KEY_WOW64_64KEY, &key);
1789+
ok(hinst, !res, "got %u\n", res);
1790+
check_reg_str(hinst, key, "ProductID", "none");
1791+
RegCloseKey(key);
1792+
1793+
return ERROR_SUCCESS;
1794+
}
1795+
1796+
UINT WINAPI ru_absent(MSIHANDLE hinst)
1797+
{
1798+
HKEY key;
1799+
LONG res;
1800+
1801+
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, ru_key, 0, KEY_READ | KEY_WOW64_64KEY, &key);
1802+
todo_wine
1803+
ok(hinst, res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
1804+
1805+
return ERROR_SUCCESS;
1806+
}

modules/rostests/winetests/msi/custom.spec

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@
3737
@ stdcall rp_absent(long)
3838
@ stdcall rpi_present(long)
3939
@ stdcall rpi_absent(long)
40+
@ stdcall ru_present(long)
41+
@ stdcall ru_absent(long)
4042
@ stdcall sds_present(long)
4143
@ stdcall sds_absent(long)
4244
@ stdcall sis_present(long)

0 commit comments

Comments
 (0)