https://git.reactos.org/?p=reactos.git;a=commitdiff;h=e0bf3932105ddf29aa9e5…
commit e0bf3932105ddf29aa9e5e43c552abafc2376d21
Author: winesync <ros-dev(a)reactos.org>
AuthorDate: Sat Mar 12 15:14:52 2022 +0100
Commit: Mark Jansen <mark.jansen(a)reactos.org>
CommitDate: Sun Mar 20 19:27:50 2022 +0100
[WINESYNC] msi/tests: Test deferral of RegisterProduct.
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>
wine commit id 71f3f2a6edf8db909a756d25d2acf96ef9258dbc by Zebediah Figura
<z.figura12(a)gmail.com>
---
modules/rostests/winetests/msi/action.c | 4 ++++
modules/rostests/winetests/msi/custom.c | 28 ++++++++++++++++++++++++++++
modules/rostests/winetests/msi/custom.spec | 2 ++
3 files changed, 34 insertions(+)
diff --git a/modules/rostests/winetests/msi/action.c
b/modules/rostests/winetests/msi/action.c
index cefa1d7d6f6..9409ad19272 100644
--- a/modules/rostests/winetests/msi/action.c
+++ b/modules/rostests/winetests/msi/action.c
@@ -405,6 +405,8 @@ static const char pp_install_exec_seq_dat[] =
"InstallFiles\t\t4000\n"
"RegisterUser\tREGISTER_USER=1 Or FULL=1\t6000\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"
"PublishFeatures\tPUBLISH_FEATURES=1 Or FULL=1\t6300\n"
"pf_immediate\tPUBLISH_FEATURES AND ALLUSERS\t6301\n"
"pf_deferred\tPUBLISH_FEATURES AND ALLUSERS\t6302\n"
@@ -423,6 +425,8 @@ static const char pp_custom_action_dat[] =
"uf_deferred\t1025\tcustom.dll\tpf_absent\n"
"pp_immediate\t1\tcustom.dll\tpp_absent\n"
"pp_deferred\t1025\tcustom.dll\tpp_present\n"
+ "rp_immediate\t1\tcustom.dll\trp_absent\n"
+ "rp_deferred\t1025\tcustom.dll\trp_present\n"
"ppc_immediate\t1\tcustom.dll\tppc_absent\n"
"ppc_deferred\t1025\tcustom.dll\tppc_present\n";
diff --git a/modules/rostests/winetests/msi/custom.c
b/modules/rostests/winetests/msi/custom.c
index b59b97a1dc7..5e9173761fc 100644
--- a/modules/rostests/winetests/msi/custom.c
+++ b/modules/rostests/winetests/msi/custom.c
@@ -1698,3 +1698,31 @@ todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))
return ERROR_SUCCESS;
}
+
+static const char rp_key[] = "Software\\Microsoft\\Windows\\CurrentVersion\\"
+ "Uninstall\\{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}";
+
+UINT WINAPI rp_present(MSIHANDLE hinst)
+{
+ HKEY key;
+ LONG res;
+
+ res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, rp_key, 0, KEY_READ | KEY_WOW64_32KEY,
&key);
+ ok(hinst, !res, "got %u\n", res);
+ check_reg_str(hinst, key, "DisplayName", "MSITEST");
+ RegCloseKey(key);
+
+ return ERROR_SUCCESS;
+}
+
+UINT WINAPI rp_absent(MSIHANDLE hinst)
+{
+ HKEY key;
+ LONG res;
+
+ res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, rp_key, 0, KEY_READ | KEY_WOW64_32KEY,
&key);
+todo_wine
+ ok(hinst, res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
+
+ return ERROR_SUCCESS;
+}
diff --git a/modules/rostests/winetests/msi/custom.spec
b/modules/rostests/winetests/msi/custom.spec
index 7f05f018073..9dadfbdf753 100644
--- a/modules/rostests/winetests/msi/custom.spec
+++ b/modules/rostests/winetests/msi/custom.spec
@@ -33,6 +33,8 @@
@ stdcall rmi_absent(long)
@ stdcall rd_present(long)
@ stdcall rd_absent(long)
+@ stdcall rp_present(long)
+@ stdcall rp_absent(long)
@ stdcall sds_present(long)
@ stdcall sds_absent(long)
@ stdcall sis_present(long)