diff --git a/reactos/dll/win32/mshtml/nsembed.c b/reactos/dll/win32/mshtml/nsembed.c
index 9fdfbb07929..c42ead86033 100644
--- a/reactos/dll/win32/mshtml/nsembed.c
+++ b/reactos/dll/win32/mshtml/nsembed.c
@@ -33,7 +33,6 @@
#include
#include "shlobj.h"
#include "shlwapi.h"
-#include "shellapi.h"
#include
@@ -396,14 +395,6 @@ static void register_nscontainer_class(void)
nscontainer_class = RegisterClassExW(&wndclass);
}
-extern void WINAPI Control_RunDLLW(HWND hWnd, HINSTANCE hInst, LPCWSTR cmd, DWORD nCmdShow);
-
-static BOOL install_wine_gecko(void)
-{
- Control_RunDLLW(GetDesktopWindow(), 0, L"appwiz.cpl install_gecko", SW_SHOW);
- return TRUE;
-}
-
static void set_environment(LPCWSTR gre_path)
{
WCHAR path_env[MAX_PATH], buf[20];
@@ -732,8 +723,7 @@ BOOL load_gecko(void)
if(!loading_thread) {
loading_thread = GetCurrentThreadId();
- if(load_wine_gecko(gre_path)
- || (install_wine_gecko() && load_wine_gecko(gre_path)))
+ if(load_wine_gecko(gre_path))
ret = init_xpcom(gre_path);
else
MESSAGE("Could not load wine-gecko. HTML rendering will be disabled.\n");
diff --git a/reactos/dll/win32/syssetup/wizard.c b/reactos/dll/win32/syssetup/wizard.c
index e3b28688e36..d6a6ae014f5 100644
--- a/reactos/dll/win32/syssetup/wizard.c
+++ b/reactos/dll/win32/syssetup/wizard.c
@@ -45,6 +45,9 @@ SETUPDATA SetupData;
/* FUNCTIONS ****************************************************************/
+
+extern void WINAPI Control_RunDLLW(HWND hWnd, HINSTANCE hInst, LPCWSTR cmd, DWORD nCmdShow);
+
BOOL
GetRosInstallCD(WCHAR *pwszPath, DWORD cchPathMax);
@@ -1902,7 +1905,6 @@ SetInstallationCompleted(VOID)
}
}
-
static INT_PTR CALLBACK
FinishDlgProc(HWND hwndDlg,
UINT uMsg,
@@ -1914,10 +1916,11 @@ FinishDlgProc(HWND hwndDlg,
{
case WM_INITDIALOG:
{
- PSETUPDATA SetupData;
-
/* Get pointer to the global setup data */
- SetupData = (PSETUPDATA)((LPPROPSHEETPAGE)lParam)->lParam;
+ PSETUPDATA SetupData = (PSETUPDATA)((LPPROPSHEETPAGE)lParam)->lParam;
+
+ /* Run the Wine Gecko prompt */
+ Control_RunDLLW(GetDesktopWindow(), 0, L"appwiz.cpl install_gecko", SW_SHOW);
/* Set title font */
SendDlgItemMessage(hwndDlg,