Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/msi/tests/action.c | 14 ++++++++++++++ dlls/msi/tests/custom.c | 28 ++++++++++++++++++++++++++++ dlls/msi/tests/custom.spec | 2 ++ 3 files changed, 44 insertions(+)
diff --git a/dlls/msi/tests/action.c b/dlls/msi/tests/action.c index 17bbddc..48a1c88 100644 --- a/dlls/msi/tests/action.c +++ b/dlls/msi/tests/action.c @@ -1086,12 +1086,25 @@ static const char pub_install_exec_seq_dat[] = "RemoveFiles\t\t1700\n" "InstallFiles\t\t2000\n" "PublishComponents\t\t3000\n" + "pub_immediate\tNOT REMOVE\t3001\n" + "pub_deferred\tNOT REMOVE\t3002\n" "UnpublishComponents\t\t3100\n" + "unp_immediate\tREMOVE\t3101\n" + "unp_deferred\tREMOVE\t3102\n" "RegisterProduct\t\t5000\n" "PublishFeatures\t\t5100\n" "PublishProduct\t\t5200\n" "InstallFinalize\t\t6000\n";
+static const char pub_custom_action_dat[] = + "Action\tType\tSource\tTarget\n" + "s72\ti2\tS64\tS0\n" + "CustomAction\tAction\n" + "pub_immediate\t1\tcustom.dll\tpub_absent\n" + "pub_deferred\t1025\tcustom.dll\tpub_present\n" + "unp_immediate\t1\tcustom.dll\tpub_present\n" + "unp_deferred\t1025\tcustom.dll\tpub_absent\n"; + static const char rd_file_dat[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n" "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n" @@ -2070,6 +2083,7 @@ static const msi_table pub_tables[] = ADD_TABLE(pub_file), ADD_TABLE(pub_publish_component), ADD_TABLE(pub_install_exec_seq), + ADD_TABLE(pub_custom_action), ADD_TABLE(media), ADD_TABLE(property) }; diff --git a/dlls/msi/tests/custom.c b/dlls/msi/tests/custom.c index 0271384..fed1e5e 100644 --- a/dlls/msi/tests/custom.c +++ b/dlls/msi/tests/custom.c @@ -1464,3 +1464,31 @@ todo_wine ok(hinst, r == ERROR_FILE_NOT_FOUND, "got %u\n", r); return ERROR_SUCCESS; } + +static const char pub_key[] = "Software\Microsoft\Installer\Components\0CBCFA296AC907244845745CEEB2F8AA"; + +UINT WINAPI pub_present(MSIHANDLE hinst) +{ + HKEY key; + LONG res; + +todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) { + res = RegOpenKeyA(HKEY_CURRENT_USER, pub_key, &key); + ok(hinst, !res, "got %u\n", res); + res = RegQueryValueExA(key, "english.txt", NULL, NULL, NULL, NULL); + ok(hinst, !res, "got %u\n", res); +} + RegCloseKey(key); + return ERROR_SUCCESS; +} + +UINT WINAPI pub_absent(MSIHANDLE hinst) +{ + HKEY key; + LONG res; + + res = RegOpenKeyA(HKEY_CURRENT_USER, pub_key, &key); +todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) + 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 3b73765..2dc09e0 100644 --- a/dlls/msi/tests/custom.spec +++ b/dlls/msi/tests/custom.spec @@ -17,6 +17,8 @@ @ stdcall pa_absent(long) @ stdcall ppc_present(long) @ stdcall ppc_absent(long) +@ stdcall pub_present(long) +@ stdcall pub_absent(long) @ stdcall rd_present(long) @ stdcall rd_absent(long) @ stdcall sds_present(long)