[WINESYNC] msi/tests: Test deferral of RegisterUser.

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>

wine commit id d0ab6deb773912b427251f041e7413669fdef702 by Zebediah Figura <z.figura12@gmail.com>
This commit is contained in:
winesync 2022-03-12 15:14:53 +01:00 committed by Mark Jansen
parent d6a9b26126
commit b493df633a
No known key found for this signature in database
GPG key ID: B39240EE84BEAE8B
3 changed files with 34 additions and 0 deletions

View file

@ -404,6 +404,8 @@ static const char pp_install_exec_seq_dat[] =
"RemoveFiles\t\t3500\n"
"InstallFiles\t\t4000\n"
"RegisterUser\tREGISTER_USER=1 Or FULL=1\t6000\n"
"ru_immediate\tREGISTER_USER AND ALLUSERS\t6001\n"
"ru_deferred\tREGISTER_USER AND ALLUSERS\t6002\n"
"RegisterProduct\tREGISTER_PRODUCT=1 Or FULL=1\t6100\n"
"rp_immediate\tREGISTER_PRODUCT AND ALLUSERS\t6101\n"
"rp_deferred\tREGISTER_PRODUCT AND ALLUSERS\t6102\n"
@ -427,6 +429,8 @@ static const char pp_custom_action_dat[] =
"pp_deferred\t1025\tcustom.dll\tpp_present\n"
"rp_immediate\t1\tcustom.dll\trp_absent\n"
"rp_deferred\t1025\tcustom.dll\trp_present\n"
"ru_immediate\t1\tcustom.dll\tru_absent\n"
"ru_deferred\t1025\tcustom.dll\tru_present\n"
"ppc_immediate\t1\tcustom.dll\tppc_absent\n"
"ppc_deferred\t1025\tcustom.dll\tppc_present\n";

View file

@ -1776,3 +1776,31 @@ todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
return ERROR_SUCCESS;
}
static const CHAR ru_key[] = "Software\\Microsoft\\Windows\\CurrentVersion\\Installer"
"\\UserData\\S-1-5-18\\Products\\84A88FD7F6998CE40A22FB59F6B9C2BB\\InstallProperties";
UINT WINAPI ru_present(MSIHANDLE hinst)
{
HKEY key;
LONG res;
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, ru_key, 0, KEY_READ | KEY_WOW64_64KEY, &key);
ok(hinst, !res, "got %u\n", res);
check_reg_str(hinst, key, "ProductID", "none");
RegCloseKey(key);
return ERROR_SUCCESS;
}
UINT WINAPI ru_absent(MSIHANDLE hinst)
{
HKEY key;
LONG res;
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, ru_key, 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

@ -37,6 +37,8 @@
@ stdcall rp_absent(long)
@ stdcall rpi_present(long)
@ stdcall rpi_absent(long)
@ stdcall ru_present(long)
@ stdcall ru_absent(long)
@ stdcall sds_present(long)
@ stdcall sds_absent(long)
@ stdcall sis_present(long)