We've found that with WiX 3.7 running our installer as a service (e.g. using srvany from the Resource Kit) on Windows Server 2008, the bootstrapper never quits after installation.

installer.exe /quiet /norestart

It calls PostQuitMessage(0) but for some reason GetMessage doesn't return. As a workaround, we can set m_fQuitting and check it before calling GetMessage.
I've attached a patch against wix38. Should I send a pull request too?

--
Bruce Cran
diff -r 50ce5c6b18f6 
src/ext/BalExtension/wixstdba/WixStandardBootstrapperApplication.cpp
--- a/src/ext/BalExtension/wixstdba/WixStandardBootstrapperApplication.cpp      
Mon Feb 25 08:47:13 2013 -0800
+++ b/src/ext/BalExtension/wixstdba/WixStandardBootstrapperApplication.cpp      
Thu Mar 14 21:05:01 2013 +0000
@@ -740,7 +740,7 @@
         ::PostMessageW(pThis->m_hWnd, BOOTSTRAPPER_ACTION_HELP == 
pThis->m_command.action ? WM_WIXSTDBA_SHOW_HELP : WM_WIXSTDBA_DETECT_PACKAGES, 
0, 0);
 
         // message pump
-        while (0 != (fRet = ::GetMessageW(&msg, NULL, 0, 0)))
+        while (!pThis->m_fQuitting && 0 != (fRet = ::GetMessageW(&msg, NULL, 
0, 0)))
         {
             if (-1 == fRet)
             {
@@ -1322,6 +1322,7 @@
             break;
 
         case WM_DESTROY:
+            pBA->m_fQuitting = TRUE;
             ::PostQuitMessage(0);
             break;
 
@@ -1659,7 +1660,7 @@
             }
 
             // Quietly exit.
-            ::PostMessageW(m_hWnd, WM_CLOSE, 0, 0);
+            ::DestroyWindow(m_hWnd);
         }
         else // try to change the pages.
         {
@@ -2360,6 +2361,7 @@
         m_sczPrereqPackage = NULL;
         m_fPrereqInstalled = FALSE;
         m_fPrereqAlreadyInstalled = FALSE;
+        m_fQuitting = FALSE;
 
         pEngine->AddRef();
         m_pEngine = pEngine;
@@ -2435,6 +2437,7 @@
     LPWSTR m_sczPrereqPackage;
     BOOL m_fPrereqInstalled;
     BOOL m_fPrereqAlreadyInstalled;
+    BOOL m_fQuitting;
 
     ITaskbarList3* m_pTaskbarList;
     UINT m_uTaskbarButtonCreatedMessage;
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
WiX-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-devs

Reply via email to