diff --git a/dlls/mshtml/install.c b/dlls/mshtml/install.c
index db3f7f65a4..364884f793 100644
--- a/dlls/mshtml/install.c
+++ b/dlls/mshtml/install.c
@@ -498,7 +498,7 @@ static INT_PTR CALLBACK installer_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARA
return FALSE;
}
-BOOL install_wine_gecko(void)
+BOOL install_wine_gecko(BOOL silent)
{
HANDLE hsem;
@@ -516,7 +516,7 @@ BOOL install_wine_gecko(void)
*/
if(!install_from_registered_dir()
&& !install_from_default_dir()
- && (url = get_url()))
+ && !silent && (url = get_url()))
DialogBoxW(hInst, MAKEINTRESOURCEW(ID_DWL_DIALOG), 0, installer_proc);
}
diff --git a/dlls/mshtml/main.c b/dlls/mshtml/main.c
index e0645f8964..898ff14a37 100644
--- a/dlls/mshtml/main.c
+++ b/dlls/mshtml/main.c
@@ -454,6 +454,9 @@ static HRESULT register_server(BOOL do_register)
if(FAILED(hres))
ERR("typelib registration failed: %08x\n", hres);
+ if(do_register && SUCCEEDED(hres))
+ load_gecko(TRUE);
+
return hres;
}
diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h
index 8ae5f1dc76..4c63f60e04 100644
--- a/dlls/mshtml/mshtml_private.h
+++ b/dlls/mshtml/mshtml_private.h
@@ -382,9 +382,11 @@ HRESULT get_client_disp_property(IOleClientSite*,DISPID,VARIANT*);
HRESULT ProtocolFactory_Create(REFCLSID,REFIID,void**);
+BOOL load_gecko(BOOL);
void close_gecko(void);
void register_nsservice(nsIComponentRegistrar*,nsIServiceManager*);
void init_nsio(nsIComponentManager*,nsIComponentRegistrar*);
+BOOL install_wine_gecko(BOOL);
void hlink_frame_navigate(HTMLDocument*,IHlinkFrame*,LPCWSTR,nsIInputStream*,DWORD);
@@ -448,8 +450,6 @@ void release_nodes(HTMLDocument*);
IHTMLElementCollection *create_all_collection(HTMLDOMNode*);
-BOOL install_wine_gecko(void);
-
/* commands */
typedef struct {
DWORD id;
diff --git a/dlls/mshtml/nsembed.c b/dlls/mshtml/nsembed.c
index a2a1d478f9..8cead970ce 100644
--- a/dlls/mshtml/nsembed.c
+++ b/dlls/mshtml/nsembed.c
@@ -361,7 +361,7 @@ static CRITICAL_SECTION_DEBUG cs_load_gecko_dbg =
};
static CRITICAL_SECTION cs_load_gecko = { &cs_load_gecko_dbg, -1, 0, 0, 0, 0 };
-static BOOL load_gecko(void)
+BOOL load_gecko(BOOL silent)
{
PRUnichar gre_path[MAX_PATH];
BOOL ret = FALSE;
@@ -380,7 +380,7 @@ static BOOL load_gecko(void)
loading_thread = GetCurrentThreadId();
if(load_wine_gecko(gre_path)
- || (install_wine_gecko() && load_wine_gecko(gre_path)))
+ || (install_wine_gecko(silent) && load_wine_gecko(gre_path)))
ret = init_xpcom(gre_path);
else
MESSAGE("Could not load Mozilla. HTML rendering will be disabled.\n");
@@ -1495,7 +1495,7 @@ NSContainer *NSContainer_Create(HTMLDocument *doc, NSContainer *parent)
NSContainer *ret;
nsresult nsres;
- if(!load_gecko())
+ if(!load_gecko(FALSE))
return NULL;
ret = mshtml_alloc(sizeof(NSContainer));