Commit 884d146b authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

msi/tests: Test deferral of RegisterExtensionInfo and UnregisterExtensionInfo.

parent fc6bd873
...@@ -1538,12 +1538,25 @@ static const char rei_install_exec_seq_dat[] = ...@@ -1538,12 +1538,25 @@ static const char rei_install_exec_seq_dat[] =
"RemoveFiles\t\t1700\n" "RemoveFiles\t\t1700\n"
"InstallFiles\t\t2000\n" "InstallFiles\t\t2000\n"
"UnregisterExtensionInfo\t\t3000\n" "UnregisterExtensionInfo\t\t3000\n"
"uei_immediate\tREMOVE\t3001\n"
"uei_deferred\tREMOVE\t3002\n"
"RegisterExtensionInfo\t\t4000\n" "RegisterExtensionInfo\t\t4000\n"
"rei_immediate\tNOT REMOVE\t4001\n"
"rei_deferred\tNOT REMOVE\t4002\n"
"RegisterProduct\t\t5000\n" "RegisterProduct\t\t5000\n"
"PublishFeatures\t\t5100\n" "PublishFeatures\t\t5100\n"
"PublishProduct\t\t5200\n" "PublishProduct\t\t5200\n"
"InstallFinalize\t\t6000\n"; "InstallFinalize\t\t6000\n";
static const char rei_custom_action_dat[] =
"Action\tType\tSource\tTarget\n"
"s72\ti2\tS64\tS0\n"
"CustomAction\tAction\n"
"rei_immediate\t1\tcustom.dll\trei_absent\n"
"rei_deferred\t1025\tcustom.dll\trei_present\n"
"uei_immediate\t1\tcustom.dll\trei_present\n"
"uei_deferred\t1025\tcustom.dll\trei_absent\n";
static const char rpi_file_dat[] = static const char rpi_file_dat[] =
"File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n" "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
"s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n" "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
...@@ -2210,6 +2223,7 @@ static const msi_table rei_tables[] = ...@@ -2210,6 +2223,7 @@ static const msi_table rei_tables[] =
ADD_TABLE(rei_verb), ADD_TABLE(rei_verb),
ADD_TABLE(rei_progid), ADD_TABLE(rei_progid),
ADD_TABLE(rei_install_exec_seq), ADD_TABLE(rei_install_exec_seq),
ADD_TABLE(rei_custom_action),
ADD_TABLE(media), ADD_TABLE(media),
ADD_TABLE(property) ADD_TABLE(property)
}; };
......
...@@ -1608,3 +1608,37 @@ todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) { ...@@ -1608,3 +1608,37 @@ todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
return ERROR_SUCCESS; return ERROR_SUCCESS;
} }
UINT WINAPI rei_present(MSIHANDLE hinst)
{
HKEY key;
LONG res;
todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
res = RegOpenKeyA(HKEY_CLASSES_ROOT, ".extension", &key);
ok(hinst, !res, "got %u\n", res);
RegCloseKey(key);
res = RegOpenKeyA(HKEY_CLASSES_ROOT, "Prog.Id.1\\shell\\Open\\command", &key);
ok(hinst, !res, "got %u\n", res);
RegCloseKey(key);
}
return ERROR_SUCCESS;
}
UINT WINAPI rei_absent(MSIHANDLE hinst)
{
HKEY key;
LONG res;
todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
res = RegOpenKeyA(HKEY_CLASSES_ROOT, ".extension", &key);
ok(hinst, res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
res = RegOpenKeyA(HKEY_CLASSES_ROOT, "Prog.Id.1\\shell\\Open\\command", &key);
ok(hinst, res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
}
return ERROR_SUCCESS;
}
...@@ -25,6 +25,8 @@ ...@@ -25,6 +25,8 @@
@ stdcall pub_absent(long) @ stdcall pub_absent(long)
@ stdcall rci_present(long) @ stdcall rci_present(long)
@ stdcall rci_absent(long) @ stdcall rci_absent(long)
@ stdcall rei_present(long)
@ stdcall rei_absent(long)
@ stdcall rd_present(long) @ stdcall rd_present(long)
@ stdcall rd_absent(long) @ stdcall rd_absent(long)
@ stdcall sds_present(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