[WINESYNC] msi/tests: Test deferral of RegisterExtensionInfo and UnregisterExtensionInfo.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 884d146b3243f01f00efb527bf3f3f578344da94 by Zebediah Figura <z.figura12@gmail.com>
This commit is contained in:
winesync 2022-03-12 15:14:50 +01:00 committed by Mark Jansen
parent a4c6f8f2c9
commit 22740df97c
No known key found for this signature in database
GPG key ID: B39240EE84BEAE8B
3 changed files with 50 additions and 0 deletions

View file

@ -1538,12 +1538,25 @@ static const char rei_install_exec_seq_dat[] =
"RemoveFiles\t\t1700\n"
"InstallFiles\t\t2000\n"
"UnregisterExtensionInfo\t\t3000\n"
"uei_immediate\tREMOVE\t3001\n"
"uei_deferred\tREMOVE\t3002\n"
"RegisterExtensionInfo\t\t4000\n"
"rei_immediate\tNOT REMOVE\t4001\n"
"rei_deferred\tNOT REMOVE\t4002\n"
"RegisterProduct\t\t5000\n"
"PublishFeatures\t\t5100\n"
"PublishProduct\t\t5200\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[] =
"File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
"s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
@ -2210,6 +2223,7 @@ static const msi_table rei_tables[] =
ADD_TABLE(rei_verb),
ADD_TABLE(rei_progid),
ADD_TABLE(rei_install_exec_seq),
ADD_TABLE(rei_custom_action),
ADD_TABLE(media),
ADD_TABLE(property)
};

View file

@ -1608,3 +1608,37 @@ todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
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;
}

View file

@ -25,6 +25,8 @@
@ stdcall pub_absent(long)
@ stdcall rci_present(long)
@ stdcall rci_absent(long)
@ stdcall rei_present(long)
@ stdcall rei_absent(long)
@ stdcall rd_present(long)
@ stdcall rd_absent(long)
@ stdcall sds_present(long)