msi: Use a common function to validate a product ID.
This commit is contained in:
parent
ad4f747fa6
commit
bde25b2cb4
|
@ -6871,7 +6871,7 @@ static UINT ACTION_RemoveEnvironmentStrings( MSIPACKAGE *package )
|
|||
return rc;
|
||||
}
|
||||
|
||||
static UINT ACTION_ValidateProductID( MSIPACKAGE *package )
|
||||
UINT msi_validate_product_id( MSIPACKAGE *package )
|
||||
{
|
||||
LPWSTR key, template, id;
|
||||
UINT r = ERROR_SUCCESS;
|
||||
|
@ -6884,7 +6884,6 @@ static UINT ACTION_ValidateProductID( MSIPACKAGE *package )
|
|||
}
|
||||
template = msi_dup_property( package->db, szPIDTemplate );
|
||||
key = msi_dup_property( package->db, szPIDKEY );
|
||||
|
||||
if (key && template)
|
||||
{
|
||||
FIXME( "partial stub: template %s key %s\n", debugstr_w(template), debugstr_w(key) );
|
||||
|
@ -6895,6 +6894,11 @@ static UINT ACTION_ValidateProductID( MSIPACKAGE *package )
|
|||
return r;
|
||||
}
|
||||
|
||||
static UINT ACTION_ValidateProductID( MSIPACKAGE *package )
|
||||
{
|
||||
return msi_validate_product_id( package );
|
||||
}
|
||||
|
||||
static UINT ACTION_ScheduleReboot( MSIPACKAGE *package )
|
||||
{
|
||||
TRACE("\n");
|
||||
|
|
|
@ -389,20 +389,7 @@ static UINT ControlEvent_Reinstall( MSIPACKAGE *package, LPCWSTR argument,
|
|||
static UINT ControlEvent_ValidateProductID(MSIPACKAGE *package, LPCWSTR argument,
|
||||
msi_dialog *dialog)
|
||||
{
|
||||
LPWSTR key, template;
|
||||
UINT ret = ERROR_SUCCESS;
|
||||
|
||||
template = msi_dup_property( package->db, szPIDTemplate );
|
||||
key = msi_dup_property( package->db, szPIDKEY );
|
||||
|
||||
if (key && template)
|
||||
{
|
||||
FIXME( "partial stub: template %s key %s\n", debugstr_w(template), debugstr_w(key) );
|
||||
ret = msi_set_property( package->db, szProductID, key );
|
||||
}
|
||||
msi_free( template );
|
||||
msi_free( key );
|
||||
return ret;
|
||||
return msi_validate_product_id( package );
|
||||
}
|
||||
|
||||
static const WCHAR end_dialogW[] = {'E','n','d','D','i','a','l','o','g',0};
|
||||
|
|
|
@ -786,6 +786,7 @@ extern INSTALLSTATE msi_get_component_action( MSIPACKAGE *package, MSICOMPONENT
|
|||
extern INSTALLSTATE msi_get_feature_action( MSIPACKAGE *package, MSIFEATURE *feature ) DECLSPEC_HIDDEN;
|
||||
extern UINT msi_load_all_components( MSIPACKAGE *package ) DECLSPEC_HIDDEN;
|
||||
extern UINT msi_load_all_features( MSIPACKAGE *package ) DECLSPEC_HIDDEN;
|
||||
extern UINT msi_validate_product_id( MSIPACKAGE *package ) DECLSPEC_HIDDEN;
|
||||
|
||||
/* record internals */
|
||||
extern void MSI_CloseRecord( MSIOBJECTHDR * ) DECLSPEC_HIDDEN;
|
||||
|
|
Loading…
Reference in New Issue