Commit 625ef149 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

msi/tests: Test deferral of PublishComponents and UnpublishComponents.

parent 5e0e25d4
......@@ -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)
};
......
......@@ -1466,3 +1466,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;
}
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment