Index: /trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsExtension.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsExtension.cpp	(revision 35278)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsExtension.cpp	(revision 35279)
@@ -178,4 +178,8 @@
      */
     QString displayInfo;
+#ifdef RT_OS_WINDOWS
+    if (pParent)
+        displayInfo.sprintf("hwnd=%#llx", (uint64_t)(uintptr_t)pParent->winId());
+#endif
     CProgress progress = extPackFile.Install(fReplaceIt, displayInfo);
     if (extPackFile.isOk())
@@ -395,4 +399,7 @@
             /** @todo Refuse this if any VMs are running. */
             QString displayInfo;
+#ifdef RT_OS_WINDOWS
+            displayInfo.sprintf("hwnd=%#llx", (uint64_t)(uintptr_t)this->winId());
+#endif
             CProgress progress = manager.Uninstall(strSelectedPackageName, false /* forced removal? */, displayInfo);
             if (manager.isOk())
Index: /trunk/src/VBox/Main/VBoxExtPackHelperApp.cpp
===================================================================
--- /trunk/src/VBox/Main/VBoxExtPackHelperApp.cpp	(revision 35278)
+++ /trunk/src/VBox/Main/VBoxExtPackHelperApp.cpp	(revision 35279)
@@ -92,4 +92,11 @@
 /** @}  */
 
+
+/*******************************************************************************
+*   Global Variables                                                           *
+*******************************************************************************/
+#ifdef RT_OS_WINDOWS
+static HINSTANCE g_hInstance;
+#endif
 
 #ifdef IN_RT_R3
@@ -1159,7 +1166,8 @@
  * @param   iCmd                The command that is being executed. (For
  *                              selecting messages.)
+ * @param   pszDisplayInfoHack  Display information hack.  Platform specific++.
  */
 static RTEXITCODE RelaunchElevatedNative(const char *pszExecPath, const char **papszArgs, int cSuArgs, int cMyArgs,
-                                         int iCmd)
+                                         int iCmd, const char *pszDisplayInfoHack)
 {
     RTEXITCODE rcExit = RTEXITCODE_FAILURE;
@@ -1167,4 +1175,6 @@
     NOREF(iCmd);
 
+    MSG Msg;
+    PeekMessage(&Msg, NULL, 0, 0, PM_NOREMOVE);
     CoInitializeEx(NULL, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE);
 
@@ -1192,6 +1202,32 @@
                 Info.hkeyClass   = NULL;
                 Info.dwHotKey    = 0;
-                Info.hIcon       = INVALID_HANDLE_VALUE;
+                Info.hMonitor    = NULL;
                 Info.hProcess    = INVALID_HANDLE_VALUE;
+
+#if 0 /* This deadlocks with the GUI because the GUI thread is stuck in the API call :/ */
+                /* Apply display hacks. */
+                if (pszDisplayInfoHack)
+                {
+                    const char *pszArg = strstr(pszDisplayInfoHack, "hwnd=");
+                    if (pszArg)
+                    {
+                        uint64_t u64Hwnd;
+                        rc = RTStrToUInt64Ex(pszArg + sizeof("hwnd=") - 1, NULL, 0, &u64Hwnd);
+                        if (RT_SUCCESS(rc))
+                        {
+                            HWND hwnd = (HWND)(uintptr_t)u64Hwnd;
+                            Info.hwnd = hwnd;
+                            Info.hMonitor = MonitorFromWindow(hwnd, MONITOR_DEFAULTTOPRIMARY);
+                        }
+                    }
+                }
+                if (Info.hMonitor == NULL)
+                {
+                    POINT Pt = {0,0};
+                    Info.hMonitor = MonitorFromPoint(Pt, MONITOR_DEFAULTTOPRIMARY);
+                }
+                if (Info.hMonitor != NULL)
+                    Info.fMask |= SEE_MASK_HMONITOR;
+ #endif
 
                 if (ShellExecuteExW(&Info))
@@ -1530,5 +1566,5 @@
                      * Do the platform specific process execution (waiting included).
                      */
-                    rcExit = RelaunchElevatedNative(szExecPath, papszArgs, cSuArgs, cArgs, iCmd);
+                    rcExit = RelaunchElevatedNative(szExecPath, papszArgs, cSuArgs, cArgs, iCmd, pszDisplayInfoHack);
 
                     /*
@@ -1819,5 +1855,6 @@
 extern "C" int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd)
 {
-    NOREF(hPrevInstance); NOREF(nShowCmd); NOREF(lpCmdLine); NOREF(hInstance);
+    g_hInstance = hInstance;
+    NOREF(hPrevInstance); NOREF(nShowCmd); NOREF(lpCmdLine);
     return main(__argc, __argv);
 }
