Module: wine Branch: master Commit: d0ab6deb773912b427251f041e7413669fdef702 URL: https://source.winehq.org/git/wine.git/?a=commit;h=d0ab6deb773912b427251f041... Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Mon May 28 21:07:53 2018 -0500 msi/tests: Test deferral of RegisterUser. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msi/tests/action.c | 4 ++++ dlls/msi/tests/custom.c | 28 ++++++++++++++++++++++++++++ dlls/msi/tests/custom.spec | 2 ++ 3 files changed, 34 insertions(+) diff --git a/dlls/msi/tests/action.c b/dlls/msi/tests/action.c index 22ece56..ea8c0e8 100644 --- a/dlls/msi/tests/action.c +++ b/dlls/msi/tests/action.c @@ -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"; diff --git a/dlls/msi/tests/custom.c b/dlls/msi/tests/custom.c index f5aa344..7a3f01e 100644 --- a/dlls/msi/tests/custom.c +++ b/dlls/msi/tests/custom.c @@ -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; +} diff --git a/dlls/msi/tests/custom.spec b/dlls/msi/tests/custom.spec index 2b3b76a..eec6a43 100644 --- a/dlls/msi/tests/custom.spec +++ b/dlls/msi/tests/custom.spec @@ -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)