Index: /trunk/include/VBox/com/com.h
===================================================================
--- /trunk/include/VBox/com/com.h	(revision 59367)
+++ /trunk/include/VBox/com/com.h	(revision 59368)
@@ -41,8 +41,9 @@
  *  willing to perform COM operations.
  *
- *  @param fGui     if call is performed on the GUI thread
+ *  @param fGui             if call is performed on the GUI thread
+ *  @param fAutoRegUpdate   if to do auto MS COM registration updates.
  *  @return COM result code
  */
-HRESULT Initialize(bool fGui = false);
+HRESULT Initialize(bool fGui = false, bool fAutoRegUpdate = true);
 
 /**
Index: /trunk/src/VBox/Main/glue/initterm.cpp
===================================================================
--- /trunk/src/VBox/Main/glue/initterm.cpp	(revision 59367)
+++ /trunk/src/VBox/Main/glue/initterm.cpp	(revision 59368)
@@ -46,4 +46,5 @@
 #include <iprt/asm.h>
 #include <iprt/env.h>
+#include <iprt/ldr.h>
 #include <iprt/param.h>
 #include <iprt/path.h>
@@ -237,9 +238,44 @@
  * @return S_OK on success and a COM result code in case of failure.
  */
-HRESULT Initialize(bool fGui)
+HRESULT Initialize(bool fGui /*= false*/, bool fAutoRegUpdate /*= true*/)
 {
     HRESULT rc = E_FAIL;
+    NOREF(fAutoRegUpdate);
 
 #if !defined(VBOX_WITH_XPCOM)
+
+# ifdef VBOX_WITH_AUTO_COM_REG_UPDATE
+    /*
+     * First time we're called in a process, we refresh the VBox COM registrations.
+     */
+    if (fAutoRegUpdate && gCOMMainThread == NIL_RTTHREAD)
+    {
+        char szPath[RTPATH_MAX];
+        int vrc = RTPathAppPrivateArch(szPath, sizeof(szPath));
+        if (RT_SUCCESS(vrc))
+#  ifndef VBOX_IN_32_ON_64_MAIN_API
+            rc = RTPathAppend(szPath, sizeof(szPath), "VBoxProxyStub.dll");
+#  else
+            rc = RTPathAppend(szPath, sizeof(szPath), "x86\\VBoxProxyStub-x86.dll");
+#  endif
+        if (RT_SUCCESS(vrc))
+        {
+            RTLDRMOD hMod;
+            vrc = RTLdrLoad(szPath, &hMod);
+            if (RT_SUCCESS(vrc))
+            {
+                union
+                {
+                    void *pv;
+                    DECLCALLBACKMEMBER(uint32_t, pfnRegUpdate)(void);
+                } u;
+                rc = RTLdrGetSymbol(hMod, "VbpsUpdateRegistrations", &u.pv);
+                if (RT_SUCCESS(rc))
+                    u.pfnRegUpdate();
+                /* Just keep it loaded. */
+            }
+        }
+    }
+# endif
 
     /*
Index: /trunk/src/VBox/Main/src-server/win/svcmain.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/win/svcmain.cpp	(revision 59367)
+++ /trunk/src/VBox/Main/src-server/win/svcmain.cpp	(revision 59368)
@@ -339,5 +339,5 @@
 
     int nRet = 0;
-    HRESULT hRes = com::Initialize();
+    HRESULT hRes = com::Initialize(false /*fGui*/, fRun /*fAutoRegUpdate*/);
 
     _ASSERTE(SUCCEEDED(hRes));
