msi: Implement the UnregisterProgIdInfo standard action.

This commit is contained in:
Hans Leidekker 2010-04-02 10:38:57 +02:00 committed by Alexandre Julliard
parent 90158af2dc
commit 3bdfa1f624
4 changed files with 40 additions and 18 deletions

View File

@ -124,8 +124,6 @@ static const WCHAR szPublishComponents[] =
{'P','u','b','l','i','s','h','C','o','m','p','o','n','e','n','t','s',0};
static const WCHAR szRegisterComPlus[] =
{'R','e','g','i','s','t','e','r','C','o','m','P','l','u','s',0};
static const WCHAR szRegisterFonts[] =
{'R','e','g','i','s','t','e','r','F','o','n','t','s',0};
static const WCHAR szRegisterUser[] =
{'R','e','g','i','s','t','e','r','U','s','e','r',0};
static const WCHAR szRemoveEnvironmentStrings[] =
@ -162,12 +160,8 @@ static const WCHAR szUnregisterComPlus[] =
{'U','n','r','e','g','i','s','t','e','r','C','o','m','P','l','u','s',0};
static const WCHAR szUnregisterExtensionInfo[] =
{'U','n','r','e','g','i','s','t','e','r','E','x','t','e','n','s','i','o','n','I','n','f','o',0};
static const WCHAR szUnregisterFonts[] =
{'U','n','r','e','g','i','s','t','e','r','F','o','n','t','s',0};
static const WCHAR szUnregisterMIMEInfo[] =
{'U','n','r','e','g','i','s','t','e','r','M','I','M','E','I','n','f','o',0};
static const WCHAR szUnregisterProgIdInfo[] =
{'U','n','r','e','g','i','s','t','e','r','P','r','o','g','I','d','I','n','f','o',0};
static const WCHAR szUnregisterTypeLibraries[] =
{'U','n','r','e','g','i','s','t','e','r','T','y','p','e','L','i','b','r','a','r','i','e','s',0};
static const WCHAR szValidateProductID[] =
@ -6967,12 +6961,6 @@ static UINT ACTION_UnregisterMIMEInfo( MSIPACKAGE *package )
return msi_unimplemented_action_stub( package, "UnregisterMIMEInfo", table );
}
static UINT ACTION_UnregisterProgIdInfo( MSIPACKAGE *package )
{
static const WCHAR table[] = { 'P','r','o','g','I','d',0 };
return msi_unimplemented_action_stub( package, "UnregisterProgIdInfo", table );
}
typedef UINT (*STANDARDACTIONHANDLER)(MSIPACKAGE*);
static const struct

View File

@ -25,7 +25,7 @@
* RegisterExtensionInfo
* RegisterMIMEInfo
* UnRegisterClassInfo
* UnRegisterProgIdInfo (TODO)
* UnRegisterProgIdInfo
* UnRegisterExtensionInfo (TODO)
* UnRegisterMIMEInfo (TODO)
*/
@ -1105,6 +1105,41 @@ UINT ACTION_RegisterProgIdInfo(MSIPACKAGE *package)
return ERROR_SUCCESS;
}
UINT ACTION_UnregisterProgIdInfo( MSIPACKAGE *package )
{
MSIPROGID *progid;
MSIRECORD *uirow;
LONG res;
load_classes_and_such( package );
LIST_FOR_EACH_ENTRY( progid, &package->progids, MSIPROGID, entry )
{
/* check if this progid is to be removed */
if (progid->Class && !progid->Class->Installed)
progid->InstallMe = FALSE;
if (progid->InstallMe)
{
TRACE("progid %s not scheduled to be removed\n", debugstr_w(progid->ProgID));
continue;
}
TRACE("Unregistering progid %s\n", debugstr_w(progid->ProgID));
res = RegDeleteTreeW( HKEY_CLASSES_ROOT, progid->ProgID );
if (res != ERROR_SUCCESS)
WARN("Failed to delete progid key %d\n", res);
uirow = MSI_CreateRecord( 1 );
MSI_RecordSetStringW( uirow, 1, progid->ProgID );
ui_actiondata( package, szUnregisterProgIdInfo, uirow );
msiobj_release( &uirow->hdr );
}
return ERROR_SUCCESS;
}
static UINT register_verb(MSIPACKAGE *package, LPCWSTR progid,
MSICOMPONENT* component, const MSIEXTENSION* extension,
MSIVERB* verb, INT* Sequence )

View File

@ -64,11 +64,6 @@ typedef struct _tagTT_NAME_RECORD {
#define SWAPWORD(x) MAKEWORD(HIBYTE(x), LOBYTE(x))
#define SWAPLONG(x) MAKELONG(SWAPWORD(HIWORD(x)), SWAPWORD(LOWORD(x)))
static const WCHAR szRegisterFonts[] =
{'R','e','g','i','s','t','e','r','F','o','n','t','s',0};
static const WCHAR szUnregisterFonts[] =
{'U','n','r','e','g','i','s','t','e','r','F','o','n','t','s',0};
static const WCHAR regfont1[] =
{'S','o','f','t','w','a','r','e','\\',
'M','i','c','r','o','s','o','f','t','\\',

View File

@ -964,6 +964,7 @@ extern UINT ACTION_RegisterMIMEInfo(MSIPACKAGE *package);
extern UINT ACTION_RegisterFonts(MSIPACKAGE *package);
extern UINT ACTION_UnregisterClassInfo(MSIPACKAGE *package);
extern UINT ACTION_UnregisterFonts(MSIPACKAGE *package);
extern UINT ACTION_UnregisterProgIdInfo(MSIPACKAGE *package);
/* Helpers */
extern DWORD deformat_string(MSIPACKAGE *package, LPCWSTR ptr, WCHAR** data );
@ -1086,6 +1087,9 @@ static const WCHAR szAppSearch[] = {'A','p','p','S','e','a','r','c','h',0};
static const WCHAR szMoveFiles[] = {'M','o','v','e','F','i','l','e','s',0};
static const WCHAR szCCPSearch[] = {'C','C','P','S','e','a','r','c','h',0};
static const WCHAR szUnregisterClassInfo[] = {'U','n','r','e','g','i','s','t','e','r','C','l','a','s','s','I','n','f','o',0};
static const WCHAR szUnregisterProgIdInfo[] = {'U','n','r','e','g','i','s','t','e','r','P','r','o','g','I','d','I','n','f','o',0};
static const WCHAR szRegisterFonts[] = {'R','e','g','i','s','t','e','r','F','o','n','t','s',0};
static const WCHAR szUnregisterFonts[] = {'U','n','r','e','g','i','s','t','e','r','F','o','n','t','s',0};
static const WCHAR szCLSID[] = {'C','L','S','I','D',0};
static const WCHAR szProgID[] = {'P','r','o','g','I','D',0};
static const WCHAR szVIProgID[] = {'V','e','r','s','i','o','n','I','n','d','e','p','e','n','d','e','n','t','P','r','o','g','I','D',0};