James Hawkins : msi:
Perform a forced reboot if a custom action returns
ERROR_INSTALL_SUSPEND.
Alexandre Julliard
julliard at wine.codeweavers.com
Wed May 30 08:56:51 CDT 2007
Module: wine
Branch: master
Commit: c2e91588e9bb470e109e3990799df451b47b0cd6
URL: http://source.winehq.org/git/wine.git/?a=commit;h=c2e91588e9bb470e109e3990799df451b47b0cd6
Author: James Hawkins <truiken at gmail.com>
Date: Tue May 29 12:03:05 2007 -0700
msi: Perform a forced reboot if a custom action returns ERROR_INSTALL_SUSPEND.
---
dlls/msi/action.c | 2 +-
dlls/msi/custom.c | 7 +++++--
dlls/msi/msipriv.h | 1 +
3 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/dlls/msi/action.c b/dlls/msi/action.c
index 689f9c4..41c474f 100644
--- a/dlls/msi/action.c
+++ b/dlls/msi/action.c
@@ -3851,7 +3851,7 @@ static UINT ACTION_InstallFinalize(MSIPACKAGE *package)
return rc;
}
-static UINT ACTION_ForceReboot(MSIPACKAGE *package)
+UINT ACTION_ForceReboot(MSIPACKAGE *package)
{
static const WCHAR RunOnce[] = {
'S','o','f','t','w','a','r','e','\\',
diff --git a/dlls/msi/custom.c b/dlls/msi/custom.c
index c8d889e..eaf5ce9 100644
--- a/dlls/msi/custom.c
+++ b/dlls/msi/custom.c
@@ -389,7 +389,7 @@ static UINT custom_get_process_return( HANDLE process )
return ERROR_SUCCESS;
}
-static UINT custom_get_thread_return( HANDLE thread )
+static UINT custom_get_thread_return( MSIPACKAGE *package, HANDLE thread )
{
DWORD rc = 0;
@@ -404,6 +404,9 @@ static UINT custom_get_thread_return( HANDLE thread )
return rc;
case ERROR_NO_MORE_ITEMS:
return ERROR_SUCCESS;
+ case ERROR_INSTALL_SUSPEND:
+ ACTION_ForceReboot( package );
+ return ERROR_SUCCESS;
default:
ERR("Invalid Return Code %d\n",rc);
return ERROR_INSTALL_FAILURE;
@@ -475,7 +478,7 @@ static UINT wait_thread_handle( msi_custom_action_info *info )
msi_dialog_check_messages( info->handle );
if (!(info->type & msidbCustomActionTypeContinue))
- rc = custom_get_thread_return( info->handle );
+ rc = custom_get_thread_return( info->package, info->handle );
free_custom_action_data( info );
}
diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h
index bcb7512..f8f1d3d 100644
--- a/dlls/msi/msipriv.h
+++ b/dlls/msi/msipriv.h
@@ -580,6 +580,7 @@ extern void append_storage_to_db( MSIDATABASE *db, IStorage *stg );
extern UINT MSI_InstallPackage( MSIPACKAGE *, LPCWSTR, LPCWSTR );
extern void ACTION_free_package_structures( MSIPACKAGE* );
extern UINT ACTION_DialogBox( MSIPACKAGE*, LPCWSTR);
+extern UINT ACTION_ForceReboot(MSIPACKAGE *package);
extern UINT MSI_Sequence( MSIPACKAGE *package, LPCWSTR szTable, INT iSequenceMode );
extern UINT MSI_SetFeatureStates( MSIPACKAGE *package );
More information about the wine-cvs
mailing list