Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
---
Resent now that bug 45317 is fixed.
dlls/msi/action.c | 89 ++++++++++++++++++++++++++++++++++++++++++++++--
dlls/msi/assembly.c | 6 ++++
dlls/msi/classes.c | 24 +++++++++++++
dlls/msi/custom.c | 1 +
dlls/msi/files.c | 18 ++++++++++
dlls/msi/font.c | 6 ++++
dlls/msi/msipriv.h | 1 +
dlls/msi/tests/custom.c | 70 +------------------------------------
dlls/msi/tests/install.c | 1 -
9 files changed, 143 insertions(+), 73 deletions(-)
diff --git a/dlls/msi/action.c b/dlls/msi/action.c
index 15f1876..bc18982 100644
--- a/dlls/msi/action.c
+++ b/dlls/msi/action.c
@@ -105,8 +105,6 @@ static const WCHAR szIsolateComponents[] =
{'I','s','o','l','a','t','e','C','o','m','p','o','n','e','n','t','s',0};
static const WCHAR szMigrateFeatureStates[] =
{'M','i','g','r','a','t','e','F','e','a','t','u','r','e','S','t','a','t','e','s',0};
-static const WCHAR szMsiUnpublishAssemblies[] =
- {'M','s','i','U','n','p','u','b','l','i','s','h','A','s','s','e','m','b','l','i','e','s',0};
static const WCHAR szInstallODBC[] =
{'I','n','s','t','a','l','l','O','D','B','C',0};
static const WCHAR szInstallServices[] =
@@ -858,6 +856,9 @@ static UINT ACTION_CreateFolders(MSIPACKAGE *package)
MSIQUERY *view;
UINT rc;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szCreateFolders);
+
rc = MSI_DatabaseOpenViewW( package->db, query, &view );
if (rc != ERROR_SUCCESS)
return ERROR_SUCCESS;
@@ -937,6 +938,9 @@ static UINT ACTION_RemoveFolders( MSIPACKAGE *package )
MSIQUERY *view;
UINT rc;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szRemoveFolders);
+
rc = MSI_DatabaseOpenViewW( package->db, query, &view );
if (rc != ERROR_SUCCESS)
return ERROR_SUCCESS;
@@ -3011,6 +3015,9 @@ static UINT ACTION_WriteRegistryValues(MSIPACKAGE *package)
MSIQUERY *view;
UINT rc;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szWriteRegistryValues);
+
rc = MSI_DatabaseOpenViewW(package->db, query, &view);
if (rc != ERROR_SUCCESS)
return ERROR_SUCCESS;
@@ -3245,6 +3252,9 @@ static UINT ACTION_RemoveRegistryValues( MSIPACKAGE *package )
MSIQUERY *view;
UINT rc;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szRemoveRegistryValues);
+
rc = MSI_DatabaseOpenViewW( package->db, registry_query, &view );
if (rc == ERROR_SUCCESS)
{
@@ -3563,9 +3573,13 @@ static UINT ACTION_ProcessComponents(MSIPACKAGE *package)
TRACE("\n");
- squash_guid( package->ProductCode, squashed_pc );
msi_set_sourcedir_props(package, FALSE);
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szProcessComponents);
+
+ squash_guid( package->ProductCode, squashed_pc );
+
LIST_FOR_EACH_ENTRY( comp, &package->components, MSICOMPONENT, entry )
{
MSIRECORD *uirow;
@@ -3839,6 +3853,9 @@ static UINT ACTION_RegisterTypeLibraries(MSIPACKAGE *package)
MSIQUERY *view;
UINT rc;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szRegisterTypeLibraries);
+
rc = MSI_DatabaseOpenViewW(package->db, query, &view);
if (rc != ERROR_SUCCESS)
return ERROR_SUCCESS;
@@ -3900,6 +3917,9 @@ static UINT ACTION_UnregisterTypeLibraries( MSIPACKAGE *package )
MSIQUERY *view;
UINT rc;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szUnregisterTypeLibraries);
+
rc = MSI_DatabaseOpenViewW( package->db, query, &view );
if (rc != ERROR_SUCCESS)
return ERROR_SUCCESS;
@@ -4084,6 +4104,9 @@ static UINT ACTION_CreateShortcuts(MSIPACKAGE *package)
HRESULT res;
UINT rc;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szCreateShortcuts);
+
rc = MSI_DatabaseOpenViewW(package->db, query, &view);
if (rc != ERROR_SUCCESS)
return ERROR_SUCCESS;
@@ -4137,6 +4160,9 @@ static UINT ACTION_RemoveShortcuts( MSIPACKAGE *package )
MSIQUERY *view;
UINT rc;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szRemoveShortcuts);
+
rc = MSI_DatabaseOpenViewW( package->db, query, &view );
if (rc != ERROR_SUCCESS)
return ERROR_SUCCESS;
@@ -4509,6 +4535,9 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package)
MSIRECORD *uirow;
BOOL republish = FALSE;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szPublishProduct);
+
if (!list_empty(&package->patches))
{
rc = msi_publish_patches(package);
@@ -4706,6 +4735,9 @@ static UINT ACTION_WriteIniValues(MSIPACKAGE *package)
MSIQUERY *view;
UINT rc;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szWriteIniValues);
+
rc = MSI_DatabaseOpenViewW(package->db, query, &view);
if (rc != ERROR_SUCCESS)
return ERROR_SUCCESS;
@@ -4849,6 +4881,9 @@ static UINT ACTION_RemoveIniValues( MSIPACKAGE *package )
MSIQUERY *view;
UINT rc;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szRemoveIniValues);
+
rc = MSI_DatabaseOpenViewW( package->db, query, &view );
if (rc == ERROR_SUCCESS)
{
@@ -4934,6 +4969,9 @@ static UINT ACTION_SelfRegModules(MSIPACKAGE *package)
MSIQUERY *view;
UINT rc;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szSelfRegModules);
+
rc = MSI_DatabaseOpenViewW(package->db, query, &view);
if (rc != ERROR_SUCCESS)
return ERROR_SUCCESS;
@@ -4984,6 +5022,9 @@ static UINT ACTION_SelfUnregModules( MSIPACKAGE *package )
MSIQUERY *view;
UINT rc;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szSelfUnregModules);
+
rc = MSI_DatabaseOpenViewW( package->db, query, &view );
if (rc != ERROR_SUCCESS)
return ERROR_SUCCESS;
@@ -4999,6 +5040,9 @@ static UINT ACTION_PublishFeatures(MSIPACKAGE *package)
UINT rc;
HKEY hkey = NULL, userdata = NULL;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szPublishFeatures);
+
if (!msi_check_publish(package))
return ERROR_SUCCESS;
@@ -5139,6 +5183,9 @@ static UINT ACTION_UnpublishFeatures(MSIPACKAGE *package)
{
MSIFEATURE *feature;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szUnpublishFeatures);
+
if (!msi_check_unpublish(package))
return ERROR_SUCCESS;
@@ -5291,6 +5338,9 @@ static UINT ACTION_RegisterProduct(MSIPACKAGE *package)
HKEY hkey, props, upgrade_key;
UINT rc;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szRegisterProduct);
+
/* FIXME: also need to publish if the product is in advertise mode */
if (!msi_get_property_int( package->db, szProductToBeRegistered, 0 )
&& !msi_check_publish(package))
@@ -5609,6 +5659,9 @@ static UINT ACTION_RegisterUser(MSIPACKAGE *package)
{0},
};
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szRegisterUser);
+
if (msi_check_unpublish(package))
{
MSIREG_DeleteUserDataProductKey(package->ProductCode, package->Context);
@@ -5931,6 +5984,9 @@ static UINT ACTION_PublishComponents(MSIPACKAGE *package)
MSIQUERY *view;
UINT rc;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szPublishComponents);
+
rc = MSI_DatabaseOpenViewW(package->db, query, &view);
if (rc != ERROR_SUCCESS)
return ERROR_SUCCESS;
@@ -6003,6 +6059,9 @@ static UINT ACTION_UnpublishComponents( MSIPACKAGE *package )
MSIQUERY *view;
UINT rc;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szUnpublishComponents);
+
rc = MSI_DatabaseOpenViewW( package->db, query, &view );
if (rc != ERROR_SUCCESS)
return ERROR_SUCCESS;
@@ -6151,6 +6210,9 @@ static UINT ACTION_InstallServices( MSIPACKAGE *package )
MSIQUERY *view;
UINT rc;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szInstallServices);
+
rc = MSI_DatabaseOpenViewW(package->db, query, &view);
if (rc != ERROR_SUCCESS)
return ERROR_SUCCESS;
@@ -6322,6 +6384,9 @@ static UINT ACTION_StartServices( MSIPACKAGE *package )
MSIQUERY *view;
UINT rc;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szStartServices);
+
rc = MSI_DatabaseOpenViewW(package->db, query, &view);
if (rc != ERROR_SUCCESS)
return ERROR_SUCCESS;
@@ -6485,6 +6550,9 @@ static UINT ACTION_StopServices( MSIPACKAGE *package )
MSIQUERY *view;
UINT rc;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szStopServices);
+
rc = MSI_DatabaseOpenViewW(package->db, query, &view);
if (rc != ERROR_SUCCESS)
return ERROR_SUCCESS;
@@ -6568,6 +6636,9 @@ static UINT ACTION_DeleteServices( MSIPACKAGE *package )
MSIQUERY *view;
UINT rc;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szDeleteServices);
+
rc = MSI_DatabaseOpenViewW( package->db, query, &view );
if (rc != ERROR_SUCCESS)
return ERROR_SUCCESS;
@@ -6838,6 +6909,9 @@ static UINT ACTION_InstallODBC( MSIPACKAGE *package )
MSIQUERY *view;
UINT rc;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szInstallODBC);
+
rc = MSI_DatabaseOpenViewW(package->db, driver_query, &view);
if (rc == ERROR_SUCCESS)
{
@@ -7016,6 +7090,9 @@ static UINT ACTION_RemoveODBC( MSIPACKAGE *package )
MSIQUERY *view;
UINT rc;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szRemoveODBC);
+
rc = MSI_DatabaseOpenViewW( package->db, driver_query, &view );
if (rc == ERROR_SUCCESS)
{
@@ -7362,6 +7439,9 @@ static UINT ACTION_WriteEnvironmentStrings( MSIPACKAGE *package )
MSIQUERY *view;
UINT rc;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szWriteEnvironmentStrings);
+
rc = MSI_DatabaseOpenViewW(package->db, query, &view);
if (rc != ERROR_SUCCESS)
return ERROR_SUCCESS;
@@ -7504,6 +7584,9 @@ static UINT ACTION_RemoveEnvironmentStrings( MSIPACKAGE *package )
MSIQUERY *view;
UINT rc;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szRemoveEnvironmentStrings);
+
rc = MSI_DatabaseOpenViewW( package->db, query, &view );
if (rc != ERROR_SUCCESS)
return ERROR_SUCCESS;
diff --git a/dlls/msi/assembly.c b/dlls/msi/assembly.c
index bccd114..59fd332 100644
--- a/dlls/msi/assembly.c
+++ b/dlls/msi/assembly.c
@@ -652,6 +652,9 @@ UINT ACTION_MsiPublishAssemblies( MSIPACKAGE *package )
{
MSICOMPONENT *comp;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szMsiPublishAssemblies);
+
LIST_FOR_EACH_ENTRY(comp, &package->components, MSICOMPONENT, entry)
{
LONG res;
@@ -717,6 +720,9 @@ UINT ACTION_MsiUnpublishAssemblies( MSIPACKAGE *package )
{
MSICOMPONENT *comp;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szMsiUnpublishAssemblies);
+
LIST_FOR_EACH_ENTRY(comp, &package->components, MSICOMPONENT, entry)
{
LONG res;
diff --git a/dlls/msi/classes.c b/dlls/msi/classes.c
index 60cc3c1..293aa10 100644
--- a/dlls/msi/classes.c
+++ b/dlls/msi/classes.c
@@ -753,6 +753,9 @@ UINT ACTION_RegisterClassInfo(MSIPACKAGE *package)
MSICLASS *cls;
UINT r;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szRegisterClassInfo);
+
r = load_classes_and_such( package );
if (r != ERROR_SUCCESS)
return r;
@@ -918,6 +921,9 @@ UINT ACTION_UnregisterClassInfo( MSIPACKAGE *package )
HKEY hkey, hkey2;
UINT r;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szUnregisterClassInfo);
+
r = load_classes_and_such( package );
if (r != ERROR_SUCCESS)
return r;
@@ -1083,6 +1089,9 @@ UINT ACTION_RegisterProgIdInfo(MSIPACKAGE *package)
MSIRECORD *uirow;
UINT r;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szRegisterProgIdInfo);
+
r = load_classes_and_such( package );
if (r != ERROR_SUCCESS)
return r;
@@ -1143,6 +1152,9 @@ UINT ACTION_UnregisterProgIdInfo( MSIPACKAGE *package )
LONG res;
UINT r;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szUnregisterProgIdInfo);
+
r = load_classes_and_such( package );
if (r != ERROR_SUCCESS)
return r;
@@ -1255,6 +1267,9 @@ UINT ACTION_RegisterExtensionInfo(MSIPACKAGE *package)
LONG res;
UINT r;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szRegisterExtensionInfo);
+
r = load_classes_and_such( package );
if (r != ERROR_SUCCESS)
return r;
@@ -1363,6 +1378,9 @@ UINT ACTION_UnregisterExtensionInfo( MSIPACKAGE *package )
LONG res;
UINT r;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szUnregisterExtensionInfo);
+
r = load_classes_and_such( package );
if (r != ERROR_SUCCESS)
return r;
@@ -1446,6 +1464,9 @@ UINT ACTION_RegisterMIMEInfo(MSIPACKAGE *package)
MSIMIME *mt;
UINT r;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szRegisterMIMEInfo);
+
r = load_classes_and_such( package );
if (r != ERROR_SUCCESS)
return r;
@@ -1500,6 +1521,9 @@ UINT ACTION_UnregisterMIMEInfo( MSIPACKAGE *package )
MSIMIME *mime;
UINT r;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szUnregisterMIMEInfo);
+
r = load_classes_and_such( package );
if (r != ERROR_SUCCESS)
return r;
diff --git a/dlls/msi/custom.c b/dlls/msi/custom.c
index 1a8a982..66f9dca 100644
--- a/dlls/msi/custom.c
+++ b/dlls/msi/custom.c
@@ -1246,6 +1246,7 @@ static BOOL action_type_matches_script( UINT type, UINT script )
switch (script)
{
case SCRIPT_NONE:
+ return FALSE;
case SCRIPT_INSTALL:
return !(type & msidbCustomActionTypeCommit) && !(type & msidbCustomActionTypeRollback);
case SCRIPT_COMMIT:
diff --git a/dlls/msi/files.c b/dlls/msi/files.c
index f6cf3e7..5a88c14 100644
--- a/dlls/msi/files.c
+++ b/dlls/msi/files.c
@@ -359,6 +359,9 @@ UINT ACTION_InstallFiles(MSIPACKAGE *package)
msi_set_sourcedir_props(package, FALSE);
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szInstallFiles);
+
schedule_install_files(package);
mi = msi_alloc_zero( sizeof(MSIMEDIAINFO) );
@@ -584,6 +587,9 @@ UINT ACTION_PatchFiles( MSIPACKAGE *package )
TRACE("%p\n", package);
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szPatchFiles);
+
mi = msi_alloc_zero( sizeof(MSIMEDIAINFO) );
TRACE("extracting files\n");
@@ -1002,6 +1008,9 @@ UINT ACTION_MoveFiles( MSIPACKAGE *package )
MSIQUERY *view;
UINT rc;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szMoveFiles);
+
rc = MSI_DatabaseOpenViewW(package->db, query, &view);
if (rc != ERROR_SUCCESS)
return ERROR_SUCCESS;
@@ -1134,6 +1143,9 @@ UINT ACTION_DuplicateFiles(MSIPACKAGE *package)
MSIQUERY *view;
UINT rc;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szDuplicateFiles);
+
rc = MSI_DatabaseOpenViewW(package->db, query, &view);
if (rc != ERROR_SUCCESS)
return ERROR_SUCCESS;
@@ -1210,6 +1222,9 @@ UINT ACTION_RemoveDuplicateFiles( MSIPACKAGE *package )
MSIQUERY *view;
UINT rc;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szRemoveDuplicateFiles);
+
rc = MSI_DatabaseOpenViewW( package->db, query, &view );
if (rc != ERROR_SUCCESS)
return ERROR_SUCCESS;
@@ -1350,6 +1365,9 @@ UINT ACTION_RemoveFiles( MSIPACKAGE *package )
MSIFILE *file;
UINT r;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szRemoveFiles);
+
r = MSI_DatabaseOpenViewW(package->db, query, &view);
if (r == ERROR_SUCCESS)
{
diff --git a/dlls/msi/font.c b/dlls/msi/font.c
index 5c1e59d..fc05006 100644
--- a/dlls/msi/font.c
+++ b/dlls/msi/font.c
@@ -294,6 +294,9 @@ UINT ACTION_RegisterFonts(MSIPACKAGE *package)
MSIQUERY *view;
UINT rc;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szRegisterFonts);
+
rc = MSI_DatabaseOpenViewW(package->db, query, &view);
if (rc != ERROR_SUCCESS)
return ERROR_SUCCESS;
@@ -374,6 +377,9 @@ UINT ACTION_UnregisterFonts( MSIPACKAGE *package )
MSIQUERY *view;
UINT r;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szUnregisterFonts);
+
r = MSI_DatabaseOpenViewW( package->db, query, &view );
if (r != ERROR_SUCCESS)
return ERROR_SUCCESS;
diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h
index 7a65e1a..34bc490 100644
--- a/dlls/msi/msipriv.h
+++ b/dlls/msi/msipriv.h
@@ -1190,6 +1190,7 @@ static const WCHAR szWow6432NodeCLSID[] = {'W','o','w','6','4','3','2','N','o','
static const WCHAR szStreams[] = {'_','S','t','r','e','a','m','s',0};
static const WCHAR szStorages[] = {'_','S','t','o','r','a','g','e','s',0};
static const WCHAR szMsiPublishAssemblies[] = {'M','s','i','P','u','b','l','i','s','h','A','s','s','e','m','b','l','i','e','s',0};
+static const WCHAR szMsiUnpublishAssemblies[] = {'M','s','i','U','n','p','u','b','l','i','s','h','A','s','s','e','m','b','l','i','e','s',0};
static const WCHAR szCostingComplete[] = {'C','o','s','t','i','n','g','C','o','m','p','l','e','t','e',0};
static const WCHAR szTempFolder[] = {'T','e','m','p','F','o','l','d','e','r',0};
static const WCHAR szDatabase[] = {'D','A','T','A','B','A','S','E',0};
diff --git a/dlls/msi/tests/custom.c b/dlls/msi/tests/custom.c
index 59a69ee..3989ca8 100644
--- a/dlls/msi/tests/custom.c
+++ b/dlls/msi/tests/custom.c
@@ -1182,52 +1182,42 @@ static BOOL pf_exists(const char *file)
UINT WINAPI cf_present(MSIHANDLE hinst)
{
-todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
ok(hinst, pf_exists("msitest\\first"), "folder absent\n");
ok(hinst, pf_exists("msitest\\second"), "folder absent\n");
ok(hinst, pf_exists("msitest\\third"), "folder absent\n");
-}
return ERROR_SUCCESS;
}
UINT WINAPI cf_absent(MSIHANDLE hinst)
{
-todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
ok(hinst, !pf_exists("msitest\\first"), "folder present\n");
ok(hinst, !pf_exists("msitest\\second"), "folder present\n");
ok(hinst, !pf_exists("msitest\\third"), "folder present\n");
-}
return ERROR_SUCCESS;
}
UINT WINAPI file_present(MSIHANDLE hinst)
{
-todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
ok(hinst, pf_exists("msitest\\first\\one.txt"), "file absent\n");
ok(hinst, pf_exists("msitest\\second\\two.txt"), "file absent\n");
-}
return ERROR_SUCCESS;
}
UINT WINAPI file_absent(MSIHANDLE hinst)
{
-todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
ok(hinst, !pf_exists("msitest\\first\\one.txt"), "file present\n");
ok(hinst, !pf_exists("msitest\\second\\two.txt"), "file present\n");
-}
return ERROR_SUCCESS;
}
UINT WINAPI crs_present(MSIHANDLE hinst)
{
-todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))
ok(hinst, pf_exists("msitest\\shortcut.lnk"), "shortcut absent\n");
return ERROR_SUCCESS;
}
UINT WINAPI crs_absent(MSIHANDLE hinst)
{
-todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))
ok(hinst, !pf_exists("msitest\\shortcut.lnk"), "shortcut present\n");
return ERROR_SUCCESS;
}
@@ -1237,7 +1227,6 @@ UINT WINAPI sds_present(MSIHANDLE hinst)
SC_HANDLE manager, service;
manager = OpenSCManagerA(NULL, NULL, SC_MANAGER_ALL_ACCESS);
service = OpenServiceA(manager, "TestService3", GENERIC_ALL);
-todo_wine
ok(hinst, !!service, "service absent: %u\n", GetLastError());
CloseServiceHandle(service);
CloseServiceHandle(manager);
@@ -1271,7 +1260,6 @@ UINT WINAPI sis_absent(MSIHANDLE hinst)
SC_HANDLE manager, service;
manager = OpenSCManagerA(NULL, NULL, SC_MANAGER_ALL_ACCESS);
service = OpenServiceA(manager, "TestService", GENERIC_ALL);
-todo_wine
ok(hinst, !service, "service present\n");
if (service) CloseServiceHandle(service);
CloseServiceHandle(manager);
@@ -1288,7 +1276,6 @@ UINT WINAPI sss_started(MSIHANDLE hinst)
service = OpenServiceA(manager, "Spooler", SC_MANAGER_ALL_ACCESS);
ret = QueryServiceStatus(service, &status);
ok(hinst, ret, "QueryServiceStatus failed: %u\n", GetLastError());
-todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))
ok(hinst, status.dwCurrentState == SERVICE_RUNNING, "got %u\n", status.dwCurrentState);
CloseServiceHandle(service);
@@ -1315,10 +1302,8 @@ UINT WINAPI sss_stopped(MSIHANDLE hinst)
UINT WINAPI rd_present(MSIHANDLE hinst)
{
-todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
ok(hinst, pf_exists("msitest\\original2.txt"), "file absent\n");
ok(hinst, pf_exists("msitest\\duplicate.txt"), "file absent\n");
-}
ok(hinst, !pf_exists("msitest\\original3.txt"), "file present\n");
ok(hinst, !pf_exists("msitest\\duplicate2.txt"), "file present\n");
return ERROR_SUCCESS;
@@ -1326,10 +1311,8 @@ todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
UINT WINAPI rd_absent(MSIHANDLE hinst)
{
-todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
ok(hinst, !pf_exists("msitest\\original2.txt"), "file present\n");
ok(hinst, !pf_exists("msitest\\duplicate.txt"), "file present\n");
-}
ok(hinst, !pf_exists("msitest\\original3.txt"), "file present\n");
ok(hinst, !pf_exists("msitest\\duplicate2.txt"), "file present\n");
return ERROR_SUCCESS;
@@ -1352,10 +1335,8 @@ UINT WINAPI odbc_present(MSIHANDLE hinst)
if (!strcmp(p, "ODBC test driver2"))
gotdriver2 = 1;
}
-todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
ok(hinst, gotdriver, "driver absent\n");
ok(hinst, gotdriver2, "driver 2 absent\n");
-}
return ERROR_SUCCESS;
}
@@ -1376,10 +1357,8 @@ UINT WINAPI odbc_absent(MSIHANDLE hinst)
if (!strcmp(p, "ODBC test driver2"))
gotdriver2 = 1;
}
-todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
ok(hinst, !gotdriver, "driver present\n");
ok(hinst, !gotdriver2, "driver 2 present\n");
-}
return ERROR_SUCCESS;
}
@@ -1392,10 +1371,8 @@ UINT WINAPI mov_present(MSIHANDLE hinst)
UINT WINAPI mov_absent(MSIHANDLE hinst)
{
-todo_wine {
ok(hinst, !pf_exists("msitest\\canada"), "file present\n");
ok(hinst, !pf_exists("msitest\\dominica"), "file present\n");
-}
return ERROR_SUCCESS;
}
@@ -1429,9 +1406,7 @@ UINT WINAPI pa_present(MSIHANDLE hinst)
res = RegOpenKeyA(HKEY_CURRENT_USER, path_dotnet, &key);
ok(hinst, !res, "got %d\n", res);
-todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
check_reg_str(hinst, key, name_dotnet, "rcHQPHq?CA@Uv-XqMI1e>Z'q,T*76M@=YEg6My?~]");
-}
RegCloseKey(key);
return ERROR_SUCCESS;
@@ -1446,9 +1421,7 @@ UINT WINAPI pa_absent(MSIHANDLE hinst)
ok(hinst, !res || res == ERROR_FILE_NOT_FOUND, "got %d\n", res);
if (!res)
{
-todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
check_reg_str(hinst, key, name_dotnet, NULL);
-}
RegCloseKey(key);
}
return ERROR_SUCCESS;
@@ -1481,7 +1454,6 @@ UINT WINAPI ppc_absent(MSIHANDLE hinst)
UINT r;
r = RegOpenKeyExA(HKEY_LOCAL_MACHINE, ppc_key, 0, KEY_QUERY_VALUE | KEY_WOW64_64KEY, &key);
-todo_wine
ok(hinst, r == ERROR_FILE_NOT_FOUND, "got %u\n", r);
return ERROR_SUCCESS;
}
@@ -1493,12 +1465,10 @@ 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;
}
@@ -1509,7 +1479,6 @@ UINT WINAPI pub_absent(MSIHANDLE hinst)
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;
}
@@ -1523,7 +1492,6 @@ UINT WINAPI pf_present(MSIHANDLE hinst)
HKEY key;
LONG res;
-todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
res = RegOpenKeyExA(HKEY_CLASSES_ROOT, pf_classkey, 0, KEY_READ | KEY_WOW64_64KEY, &key);
ok(hinst, !res, "got %u\n", res);
check_reg_str(hinst, key, "feature", "");
@@ -1535,7 +1503,6 @@ todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
check_reg_str(hinst, key, "feature", "VGtfp^p+,?82@JU1j_KE");
check_reg_str(hinst, key, "montecristo", "VGtfp^p+,?82@JU1j_KE");
RegCloseKey(key);
-}
return ERROR_SUCCESS;
}
@@ -1546,11 +1513,9 @@ UINT WINAPI pf_absent(MSIHANDLE hinst)
LONG res;
res = RegOpenKeyExA(HKEY_CLASSES_ROOT, pf_classkey, 0, KEY_READ | KEY_WOW64_64KEY, &key);
-todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))
ok(hinst, res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, pf_userkey, 0, KEY_READ | KEY_WOW64_64KEY, &key);
-todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))
ok(hinst, res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
return ERROR_SUCCESS;
@@ -1579,7 +1544,6 @@ UINT WINAPI pp_absent(MSIHANDLE hinst)
LONG res;
res = RegOpenKeyExA(HKEY_CLASSES_ROOT, pp_prodkey, 0, KEY_READ | KEY_WOW64_64KEY, &key);
-todo_wine
ok(hinst, res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
return ERROR_SUCCESS;
@@ -1590,7 +1554,6 @@ UINT WINAPI rci_present(MSIHANDLE hinst)
HKEY key;
LONG res;
-todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
res = RegOpenKeyExA(HKEY_CLASSES_ROOT, "CLSID\\{110913E7-86D1-4BF3-9922-BA103FCDDDFA}",
0, KEY_READ | KEY_WOW64_32KEY, &key);
ok(hinst, !res, "got %u\n", res);
@@ -1603,7 +1566,6 @@ todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
res = RegOpenKeyA(HKEY_CLASSES_ROOT, "AppID\\{CFCC3B38-E683-497D-9AB4-CB40AAFE307F}", &key);
ok(hinst, !res, "got %u\n", res);
RegCloseKey(key);
-}
return ERROR_SUCCESS;
}
@@ -1613,7 +1575,6 @@ UINT WINAPI rci_absent(MSIHANDLE hinst)
HKEY key;
LONG res;
-todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
res = RegOpenKeyExA(HKEY_CLASSES_ROOT, "CLSID\\{110913E7-86D1-4BF3-9922-BA103FCDDDFA}",
0, KEY_READ | KEY_WOW64_32KEY, &key);
ok(hinst, res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
@@ -1623,7 +1584,6 @@ todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
res = RegOpenKeyA(HKEY_CLASSES_ROOT, "AppID\\{CFCC3B38-E683-497D-9AB4-CB40AAFE307F}", &key);
ok(hinst, res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
-}
return ERROR_SUCCESS;
}
@@ -1633,7 +1593,6 @@ 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);
@@ -1641,7 +1600,6 @@ todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
res = RegOpenKeyA(HKEY_CLASSES_ROOT, "Prog.Id.1\\shell\\Open\\command", &key);
ok(hinst, !res, "got %u\n", res);
RegCloseKey(key);
-}
return ERROR_SUCCESS;
}
@@ -1651,13 +1609,11 @@ 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;
}
@@ -1672,7 +1628,6 @@ UINT WINAPI font_present(MSIHANDLE hinst)
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, font_key, 0, KEY_QUERY_VALUE | KEY_WOW64_64KEY, &key);
ok(hinst, !res, "got %u\n", res);
res = RegQueryValueExA(key, "msi test font", NULL, NULL, NULL, NULL);
-todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))
ok(hinst, !res, "got %u\n", res);
RegCloseKey(key);
@@ -1686,9 +1641,7 @@ UINT WINAPI font_absent(MSIHANDLE hinst)
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, font_key, 0, KEY_QUERY_VALUE | KEY_WOW64_64KEY, &key);
ok(hinst, !res, "got %u\n", res);
-todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
check_reg_str(hinst, key, "msi test font", NULL);
-}
RegCloseKey(key);
return ERROR_SUCCESS;
@@ -1700,7 +1653,6 @@ UINT WINAPI rmi_present(MSIHANDLE hinst)
LONG res;
res = RegOpenKeyA(HKEY_CLASSES_ROOT, "MIME\\Database\\Content Type\\mime/type", &key);
-todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))
ok(hinst, !res, "got %u\n", res);
return ERROR_SUCCESS;
@@ -1712,7 +1664,6 @@ UINT WINAPI rmi_absent(MSIHANDLE hinst)
LONG res;
res = RegOpenKeyA(HKEY_CLASSES_ROOT, "MIME\\Database\\Content Type\\mime/type", &key);
-todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))
ok(hinst, res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
return ERROR_SUCCESS;
@@ -1740,7 +1691,6 @@ UINT WINAPI rp_absent(MSIHANDLE hinst)
LONG res;
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, rp_key, 0, KEY_READ | KEY_WOW64_32KEY, &key);
-todo_wine
ok(hinst, res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
return ERROR_SUCCESS;
@@ -1751,7 +1701,6 @@ UINT WINAPI rpi_present(MSIHANDLE hinst)
HKEY key;
LONG res;
-todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
res = RegOpenKeyExA(HKEY_CLASSES_ROOT, "CLSID\\{110913E7-86D1-4BF3-9922-BA103FCDDDFA}",
0, KEY_READ | KEY_WOW64_32KEY, &key);
ok(hinst, !res, "got %u\n", res);
@@ -1768,7 +1717,6 @@ todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
res = RegOpenKeyA(HKEY_CLASSES_ROOT, "Winetest.Class.2", &key);
ok(hinst, !res, "got %u\n", res);
RegCloseKey(key);
-}
return ERROR_SUCCESS;
}
@@ -1778,7 +1726,6 @@ UINT WINAPI rpi_absent(MSIHANDLE hinst)
HKEY key;
LONG res;
-todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
res = RegOpenKeyExA(HKEY_CLASSES_ROOT, "CLSID\\{110913E7-86D1-4BF3-9922-BA103FCDDDFA}",
0, KEY_READ | KEY_WOW64_32KEY, &key);
ok(hinst, res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
@@ -1791,7 +1738,6 @@ todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
res = RegOpenKeyA(HKEY_CLASSES_ROOT, "Winetest.Class.2", &key);
ok(hinst, res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
-}
return ERROR_SUCCESS;
}
@@ -1818,7 +1764,6 @@ UINT WINAPI ru_absent(MSIHANDLE hinst)
LONG res;
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, ru_key, 0, KEY_READ | KEY_WOW64_64KEY, &key);
-todo_wine
ok(hinst, res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
return ERROR_SUCCESS;
@@ -1833,10 +1778,8 @@ UINT WINAPI tl_present(MSIHANDLE hinst)
HRESULT hr;
hr = LoadRegTypeLib(&LIBID_register_test, 7, 1, 0, &tlb);
-todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))
ok(hinst, hr == S_OK, "got %#x\n", hr);
- if (tlb)
- ITypeLib_Release(tlb);
+ ITypeLib_Release(tlb);
return ERROR_SUCCESS;
}
@@ -1847,7 +1790,6 @@ UINT WINAPI tl_absent(MSIHANDLE hinst)
HRESULT hr;
hr = LoadRegTypeLib(&LIBID_register_test, 7, 1, 0, &tlb);
-todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))
ok(hinst, hr == TYPE_E_LIBNOTREGISTERED, "got %#x\n", hr);
return ERROR_SUCCESS;
@@ -1859,7 +1801,6 @@ UINT WINAPI sr_present(MSIHANDLE hinst)
LONG res;
res = RegOpenKeyA(HKEY_CLASSES_ROOT, "selfreg_test", &key);
-todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))
ok(hinst, !res, "got %u\n", res);
RegCloseKey(key);
@@ -1872,7 +1813,6 @@ UINT WINAPI sr_absent(MSIHANDLE hinst)
LONG res;
res = RegOpenKeyA(HKEY_CLASSES_ROOT, "selfreg_test", &key);
-todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))
ok(hinst, res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
return ERROR_SUCCESS;
@@ -1885,10 +1825,8 @@ UINT WINAPI env_present(MSIHANDLE hinst)
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;
@@ -1901,10 +1839,8 @@ UINT WINAPI env_absent(MSIHANDLE hinst)
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;
@@ -1920,7 +1856,6 @@ UINT WINAPI ini_present(MSIHANDLE hinst)
strcat(path, "\\msitest\\test.ini");
len = GetPrivateProfileStringA("section1", "key1", NULL, buf, sizeof(buf), path);
-todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))
ok(hinst, len == 6, "got %u\n", len);
return ERROR_SUCCESS;
@@ -1936,7 +1871,6 @@ UINT WINAPI ini_absent(MSIHANDLE hinst)
strcat(path, "\\msitest\\test.ini");
len = GetPrivateProfileStringA("section1", "key1", NULL, buf, sizeof(buf), path);
-todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))
ok(hinst, !len, "got %u\n", len);
return ERROR_SUCCESS;
@@ -1949,7 +1883,6 @@ UINT WINAPI wrv_present(MSIHANDLE hinst)
res = RegOpenKeyA(HKEY_CURRENT_USER, "msitest", &key);
ok(hinst, !res, "got %u\n", res);
- todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))
check_reg_str(hinst, key, "sz", "string");
RegCloseKey(key);
@@ -1963,7 +1896,6 @@ UINT WINAPI wrv_absent(MSIHANDLE hinst)
res = RegOpenKeyA(HKEY_CURRENT_USER, "msitest", &key);
ok(hinst, !res, "got %u\n", res);
- todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))
check_reg_str(hinst, key, "sz", NULL);
RegCloseKey(key);
diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c
index 80137c1..e147df6 100644
--- a/dlls/msi/tests/install.c
+++ b/dlls/msi/tests/install.c
@@ -6086,7 +6086,6 @@ static void test_deferred_action(void)
}
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
-todo_wine
check_file_matches(file, "onetwo");
ok(DeleteFileA(file), "Directory not created\n");
--
2.7.4