https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6a9321b8970bd3ec0628a490279b6c09224e22f5

commit 6a9321b8970bd3ec0628a490279b6c09224e22f5
Author:     winesync <[email protected]>
AuthorDate: Sat Mar 12 15:14:49 2022 +0100
Commit:     Mark Jansen <[email protected]>
CommitDate: Sun Mar 20 19:27:49 2022 +0100

    [WINESYNC] msi/tests: Test deferral of PublishProduct.
    
    Signed-off-by: Zebediah Figura <[email protected]>
    Signed-off-by: Hans Leidekker <[email protected]>
    Signed-off-by: Alexandre Julliard <[email protected]>
    
    wine commit id 4f2bb46fd1b7e190946b288312b2be30a68c02c1 by Zebediah Figura 
<[email protected]>
---
 modules/rostests/winetests/msi/action.c    |  4 ++++
 modules/rostests/winetests/msi/custom.c    | 29 +++++++++++++++++++++++++++++
 modules/rostests/winetests/msi/custom.spec |  2 ++
 3 files changed, 35 insertions(+)

diff --git a/modules/rostests/winetests/msi/action.c 
b/modules/rostests/winetests/msi/action.c
index 82ec376ea17..3d747043dc5 100644
--- a/modules/rostests/winetests/msi/action.c
+++ b/modules/rostests/winetests/msi/action.c
@@ -409,6 +409,8 @@ static const char pp_install_exec_seq_dat[] =
     "pf_immediate\tPUBLISH_FEATURES AND ALLUSERS\t6301\n"
     "pf_deferred\tPUBLISH_FEATURES AND ALLUSERS\t6302\n"
     "PublishProduct\tPUBLISH_PRODUCT=1 Or FULL=1\t6400\n"
+    "pp_immediate\tPUBLISH_PRODUCT AND ALLUSERS\t6401\n"
+    "pp_deferred\tPUBLISH_PRODUCT AND ALLUSERS\t6402\n"
     "InstallFinalize\t\t6600";
 
 static const char pp_custom_action_dat[] =
@@ -419,6 +421,8 @@ static const char pp_custom_action_dat[] =
     "pf_deferred\t1025\tcustom.dll\tpf_present\n"
     "uf_immediate\t1\tcustom.dll\tpf_present\n"
     "uf_deferred\t1025\tcustom.dll\tpf_absent\n"
+    "pp_immediate\t1\tcustom.dll\tpp_absent\n"
+    "pp_deferred\t1025\tcustom.dll\tpp_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 bac2653a5fa..cfb368f9c28 100644
--- a/modules/rostests/winetests/msi/custom.c
+++ b/modules/rostests/winetests/msi/custom.c
@@ -1536,3 +1536,32 @@ todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))
 
     return ERROR_SUCCESS;
 }
+
+static const char pp_prodkey[] = 
"Installer\\Products\\84A88FD7F6998CE40A22FB59F6B9C2BB";
+
+UINT WINAPI pp_present(MSIHANDLE hinst)
+{
+    HKEY key;
+    LONG res;
+
+    res = RegOpenKeyExA(HKEY_CLASSES_ROOT, pp_prodkey, 0, KEY_READ | 
KEY_WOW64_64KEY, &key);
+    ok(hinst, !res, "got %u\n", res);
+    check_reg_str(hinst, key, "ProductName", "MSITEST");
+    check_reg_str(hinst, key, "PackageCode", 
"AC75740029052C94DA02821EECD05F2F");
+    check_reg_str(hinst, key, "Clients", ":");
+
+    RegCloseKey(key);
+    return ERROR_SUCCESS;
+}
+
+UINT WINAPI pp_absent(MSIHANDLE hinst)
+{
+    HKEY key;
+    LONG res;
+
+    res = RegOpenKeyExA(HKEY_CLASSES_ROOT, pp_prodkey, 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/modules/rostests/winetests/msi/custom.spec 
b/modules/rostests/winetests/msi/custom.spec
index 209257025f7..d8b5f0826fb 100644
--- a/modules/rostests/winetests/msi/custom.spec
+++ b/modules/rostests/winetests/msi/custom.spec
@@ -17,6 +17,8 @@
 @ stdcall pa_absent(long)
 @ stdcall pf_present(long)
 @ stdcall pf_absent(long)
+@ stdcall pp_present(long)
+@ stdcall pp_absent(long)
 @ stdcall ppc_present(long)
 @ stdcall ppc_absent(long)
 @ stdcall pub_present(long)

Reply via email to