main/setup_native/source/win32/customactions/reg4msdoc/register.cxx
//-----------------------------------------
// registers OpenOffice for MS document
// types and as default HTML editor if
// specified
//-----------------------------------------
registers OpenOffice for MS document
types and as default HTML editor if
specified
registers OpenOffice for MS document types and as default HTML editor if specified
void Register4MsDoc(MSIHANDLE handle, int Register)
{
    try
    {
        RegistrationContextInformation RegContext(handle, GetOfficeExecutablePath(handle));
        RegistrarPtr CurrentRegistrar = CreateRegistrar(IsAllUserInstallation(handle), RegContext);
        if ((Register & MSWORD))
            CurrentRegistrar->RegisterForMsWord();
        if ((Register & MSEXCEL))
            CurrentRegistrar->RegisterForMsExcel();
        if ((Register & MSPOWERPOINT))
            CurrentRegistrar->RegisterForMsPowerPoint();
        if ((Register & HTML_EDITOR))
            CurrentRegistrar->RegisterAsHtmlEditorForInternetExplorer();
        if ((Register & DEFAULT_SHELL_HTML_EDITOR))
        {
            CurrentRegistrar->RegisterAsDefaultHtmlEditorForInternetExplorer();
            CurrentRegistrar->RegisterAsDefaultShellHtmlEditor();
        }
    }
    catch(RegistryException&)
    {
        assert(false);
    }
    if (Register)
        SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_IDLIST, 0, 0);
}
void Register4MsDoc ( MSIHANDLE handle , int Register ) { try { RegistrationContextInformation RegContext ( handle , GetOfficeExecutablePath ( handle ) ) ; RegistrarPtr CurrentRegistrar = CreateRegistrar ( IsAllUserInstallation ( handle ) , RegContext ) ; if ( ( Register & MSWORD ) ) CurrentRegistrar -> RegisterForMsWord ( ) ; if ( ( Register & MSEXCEL ) ) CurrentRegistrar -> RegisterForMsExcel ( ) ; if ( ( Register & MSPOWERPOINT ) ) CurrentRegistrar -> RegisterForMsPowerPoint ( ) ; if ( ( Register & HTML_EDITOR ) ) CurrentRegistrar -> RegisterAsHtmlEditorForInternetExplorer ( ) ; if ( ( Register & DEFAULT_SHELL_HTML_EDITOR ) ) { CurrentRegistrar -> RegisterAsDefaultHtmlEditorForInternetExplorer ( ) ; CurrentRegistrar -> RegisterAsDefaultShellHtmlEditor ( ) ; } } catch ( RegistryException & ) { assert ( false ) ; } if ( Register ) SHChangeNotify ( SHCNE_ASSOCCHANGED , SHCNF_IDLIST , 0 , 0 ) ; }
registers OpenOffice for MS document
types and as default HTML editor if
specified
registers OpenOffice for MS document types and as default HTML editor if specified