mirror of
https://github.com/reactos/reactos.git
synced 2024-07-02 18:54:25 +00:00
[WINESYNC] msi/tests: Test deferral of WriteEnvironmentStrings and RemoveEnvironmentStrings.
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 aae3d6b5afaa67530ee62f922a301fce1967151a by Zebediah Figura <z.figura12@gmail.com>
This commit is contained in:
parent
7b0084e68a
commit
39c835f2a3
|
@ -199,12 +199,25 @@ static const char env_install_exec_seq_dat[] =
|
||||||
"InstallInitialize\t\t500\n"
|
"InstallInitialize\t\t500\n"
|
||||||
"ProcessComponents\t\t600\n"
|
"ProcessComponents\t\t600\n"
|
||||||
"WriteEnvironmentStrings\t\t700\n"
|
"WriteEnvironmentStrings\t\t700\n"
|
||||||
|
"wes_immediate\tNOT REMOVE\t701\n"
|
||||||
|
"wes_deferred\tNOT REMOVE\t702\n"
|
||||||
"RemoveEnvironmentStrings\t\t800\n"
|
"RemoveEnvironmentStrings\t\t800\n"
|
||||||
|
"res_immediate\tREMOVE\t801\n"
|
||||||
|
"res_deferred\tREMOVE\t802\n"
|
||||||
"RegisterProduct\t\t900\n"
|
"RegisterProduct\t\t900\n"
|
||||||
"PublishFeatures\t\t1000\n"
|
"PublishFeatures\t\t1000\n"
|
||||||
"PublishProduct\t\t1100\n"
|
"PublishProduct\t\t1100\n"
|
||||||
"InstallFinalize\t\t1200\n";
|
"InstallFinalize\t\t1200\n";
|
||||||
|
|
||||||
|
static const char env_custom_action_dat[] =
|
||||||
|
"Action\tType\tSource\tTarget\n"
|
||||||
|
"s72\ti2\tS64\tS0\n"
|
||||||
|
"CustomAction\tAction\n"
|
||||||
|
"wes_immediate\t1\tcustom.dll\tenv_absent\n"
|
||||||
|
"wes_deferred\t1025\tcustom.dll\tenv_present\n"
|
||||||
|
"res_immediate\t1\tcustom.dll\tenv_present\n"
|
||||||
|
"res_deferred\t1025\tcustom.dll\tenv_absent\n";
|
||||||
|
|
||||||
static const char env_environment_dat[] =
|
static const char env_environment_dat[] =
|
||||||
"Environment\tName\tValue\tComponent_\n"
|
"Environment\tName\tValue\tComponent_\n"
|
||||||
"s72\tl255\tL255\ts72\n"
|
"s72\tl255\tL255\ts72\n"
|
||||||
|
@ -1953,6 +1966,7 @@ static const msi_table env_tables[] =
|
||||||
ADD_TABLE(feature_comp),
|
ADD_TABLE(feature_comp),
|
||||||
ADD_TABLE(file),
|
ADD_TABLE(file),
|
||||||
ADD_TABLE(env_install_exec_seq),
|
ADD_TABLE(env_install_exec_seq),
|
||||||
|
ADD_TABLE(env_custom_action),
|
||||||
ADD_TABLE(media),
|
ADD_TABLE(media),
|
||||||
ADD_TABLE(property),
|
ADD_TABLE(property),
|
||||||
ADD_TABLE(env_environment)
|
ADD_TABLE(env_environment)
|
||||||
|
|
|
@ -1858,3 +1858,35 @@ todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))
|
||||||
|
|
||||||
return ERROR_SUCCESS;
|
return ERROR_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UINT WINAPI env_present(MSIHANDLE hinst)
|
||||||
|
{
|
||||||
|
HKEY key;
|
||||||
|
LONG res;
|
||||||
|
|
||||||
|
res = RegOpenKeyA(HKEY_CURRENT_USER, "Environment", &key);
|
||||||
|
ok(hinst, !res, "got %u\n", res);
|
||||||
|
todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
|
||||||
|
check_reg_str(hinst, key, "MSITESTVAR3", "1");
|
||||||
|
check_reg_str(hinst, key, "MSITESTVAR4", "1");
|
||||||
|
}
|
||||||
|
RegCloseKey(key);
|
||||||
|
|
||||||
|
return ERROR_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
UINT WINAPI env_absent(MSIHANDLE hinst)
|
||||||
|
{
|
||||||
|
HKEY key;
|
||||||
|
LONG res;
|
||||||
|
|
||||||
|
res = RegOpenKeyA(HKEY_CURRENT_USER, "Environment", &key);
|
||||||
|
ok(hinst, !res, "got %u\n", res);
|
||||||
|
todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
|
||||||
|
check_reg_str(hinst, key, "MSITESTVAR3", NULL);
|
||||||
|
check_reg_str(hinst, key, "MSITESTVAR4", NULL);
|
||||||
|
}
|
||||||
|
RegCloseKey(key);
|
||||||
|
|
||||||
|
return ERROR_SUCCESS;
|
||||||
|
}
|
||||||
|
|
|
@ -7,6 +7,8 @@
|
||||||
@ stdcall cf_absent(long)
|
@ stdcall cf_absent(long)
|
||||||
@ stdcall crs_present(long)
|
@ stdcall crs_present(long)
|
||||||
@ stdcall crs_absent(long)
|
@ stdcall crs_absent(long)
|
||||||
|
@ stdcall env_present(long)
|
||||||
|
@ stdcall env_absent(long)
|
||||||
@ stdcall file_present(long)
|
@ stdcall file_present(long)
|
||||||
@ stdcall file_absent(long)
|
@ stdcall file_absent(long)
|
||||||
@ stdcall font_present(long)
|
@ stdcall font_present(long)
|
||||||
|
|
Loading…
Reference in a new issue