Hans Leidekker : msi: Implement the Reinstall control event.
Alexandre Julliard
julliard at winehq.org
Fri Mar 26 12:11:52 CDT 2010
Module: wine
Branch: master
Commit: 2c5e1f686be5aae0c4a1bc75860e746909503f62
URL: http://source.winehq.org/git/wine.git/?a=commit;h=2c5e1f686be5aae0c4a1bc75860e746909503f62
Author: Hans Leidekker <hans at codeweavers.com>
Date: Fri Mar 26 12:12:06 2010 +0100
msi: Implement the Reinstall control event.
---
dlls/msi/events.c | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/dlls/msi/events.c b/dlls/msi/events.c
index e8f2297..1f63c72 100644
--- a/dlls/msi/events.c
+++ b/dlls/msi/events.c
@@ -383,6 +383,24 @@ static UINT ControlEvent_ReinstallMode(MSIPACKAGE *package, LPCWSTR argument,
return MSI_SetPropertyW( package, szReinstallMode, argument );
}
+static UINT ControlEvent_Reinstall( MSIPACKAGE *package, LPCWSTR argument,
+ msi_dialog *dialog )
+{
+ static const WCHAR szReinstallEq[] = {'R','E','I','N','S','T','A','L','L','=',0};
+ UINT r = ERROR_OUTOFMEMORY;
+ WCHAR *cmd;
+
+ cmd = msi_alloc( (strlenW( szReinstallEq ) + strlenW( argument ) + 1) * sizeof(WCHAR) );
+ if (cmd)
+ {
+ strcpyW( cmd, szReinstallEq );
+ strcatW( cmd, argument );
+ r = MsiConfigureProductExW( package->ProductCode, INSTALLLEVEL_DEFAULT, INSTALLSTATE_DEFAULT, cmd );
+ msi_free( cmd );
+ }
+ return r;
+}
+
static UINT ControlEvent_ValidateProductID(MSIPACKAGE *package, LPCWSTR argument,
msi_dialog *dialog)
{
@@ -417,6 +435,7 @@ static const struct _events Events[] = {
{ "DirectoryListUp",ControlEvent_DirectoryListUp },
{ "SelectionBrowse",ControlEvent_SpawnDialog },
{ "ReinstallMode",ControlEvent_ReinstallMode },
+ { "Reinstall",ControlEvent_Reinstall },
{ "ValidateProductID",ControlEvent_ValidateProductID },
{ NULL,NULL },
};
More information about the wine-cvs
mailing list