mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-06 05:00:30 +00:00
msi: Implement the Reinstall control event.
This commit is contained in:
parent
e5869d5d5c
commit
2c5e1f686b
|
@ -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 },
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue