Index: trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk	(revision 5021)
+++ trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk	(revision 5022)
@@ -103,5 +103,6 @@
 	include/VBoxConsoleView.h \
 	include/VBoxProblemReporter.h \
-	include/VBoxDownloaderWgt.h
+	include/VBoxDownloaderWgt.h \
+	include/VBoxNetworkFramework.h
 
 # Sources containing local definitions of classes that use the Q_OBJECT macro
@@ -167,5 +168,6 @@
 	src/VBoxVMListBox.cpp \
 	src/VBoxFrameBuffer.cpp \
-	src/HappyHttp.cpp
+	src/HappyHttp.cpp \
+	src/VBoxNetworkFramework.cpp
 
 ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(BUILD_TARGET)),) # X11
@@ -189,4 +191,5 @@
 src/HappyHttp.cpp_CXXFLAGS += -fexceptions
 src/VBoxDownloaderWgt.cpp_CXXFLAGS += -fexceptions
+src/VBoxNetworkFramework.cpp_CXXFLAGS += -fexceptions
 endif
 src/HappyHttp.cpp_CXXFLAGS.linux += -O2
Index: trunk/src/VBox/Frontends/VirtualBox/VBoxUI.pro
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/VBoxUI.pro	(revision 5021)
+++ trunk/src/VBox/Frontends/VirtualBox/VBoxUI.pro	(revision 5022)
@@ -35,5 +35,6 @@
 	ui/VBoxAboutDlg.ui \
 	ui/VBoxVMFirstRunWzd.ui \
-	ui/VBoxVMLogViewer.ui
+	ui/VBoxVMLogViewer.ui \
+	ui/VBoxRegistrationDlg.ui
 
 IMAGES	= images/tpixel.png \
Index: trunk/src/VBox/Frontends/VirtualBox/include/VBoxDefs.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/include/VBoxDefs.h	(revision 5021)
+++ trunk/src/VBox/Frontends/VirtualBox/include/VBoxDefs.h	(revision 5022)
@@ -132,4 +132,5 @@
         MachineDataChangeEventType,
         MachineRegisteredEventType,
+        ShowRegDlgEventType,
         SessionStateChangeEventType,
         SnapshotEventType,
@@ -163,4 +164,6 @@
     static const char* GUI_LicenseKey;
 #endif
+    static const char* GUI_RegistrationTryLeft;
+    static const char* GUI_RegistrationDlgWinID;
 };
 
Index: trunk/src/VBox/Frontends/VirtualBox/include/VBoxGlobal.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/include/VBoxGlobal.h	(revision 5021)
+++ trunk/src/VBox/Frontends/VirtualBox/include/VBoxGlobal.h	(revision 5022)
@@ -100,4 +100,12 @@
 };
 
+class VBoxShowRegDlgEvent : public QEvent
+{
+public:
+    VBoxShowRegDlgEvent()
+        : QEvent ((QEvent::Type) VBoxDefs::ShowRegDlgEventType)
+        {}
+};
+
 class VBoxSessionStateChangeEvent : public QEvent
 {
@@ -136,4 +144,5 @@
 class VBoxSelectorWnd;
 class VBoxConsoleWnd;
+class VBoxRegistrationDlg;
 
 class VBoxGlobal : public QObject
@@ -367,4 +376,6 @@
     bool showVirtualBoxLicense();
 #endif
+
+    void showRegistrationDialog();
 
     CSession openSession (const QUuid &id);
@@ -519,4 +530,6 @@
     VBoxSelectorWnd *selector_wnd;
     VBoxConsoleWnd *console_wnd;
+
+    VBoxRegistrationDlg *mRegDlg;
 
     QUuid vmUuid;
Index: trunk/src/VBox/Frontends/VirtualBox/include/VBoxProblemReporter.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/include/VBoxProblemReporter.h	(revision 5021)
+++ trunk/src/VBox/Frontends/VirtualBox/include/VBoxProblemReporter.h	(revision 5022)
@@ -209,4 +209,10 @@
     void warnAboutNewAdditions (QWidget *, const QString &, const QString &);
 
+    void cannotConnectRegister (QWidget *aParent,
+                                const QString &aURL,
+                                const QString &aReason);
+    void showRegisterResult (QWidget *aParent,
+                             const QString &aResult);
+
     bool remindAboutInputCapture();
     bool remindAboutAutoCapture();
Index: trunk/src/VBox/Frontends/VirtualBox/src/VBoxDefs.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/VBoxDefs.cpp	(revision 5021)
+++ trunk/src/VBox/Frontends/VirtualBox/src/VBoxDefs.cpp	(revision 5022)
@@ -32,3 +32,4 @@
 const char* VBoxDefs::GUI_LicenseKey = "GUI/LicenseAgreed";
 #endif
-
+const char* VBoxDefs::GUI_RegistrationTryLeft = "GUI/RegistrationTryLeft";
+const char* VBoxDefs::GUI_RegistrationDlgWinID = "GUI/RegistrationDlgWinID";
Index: trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobal.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobal.cpp	(revision 5021)
+++ trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobal.cpp	(revision 5022)
@@ -24,4 +24,5 @@
 #include "VBoxProblemReporter.h"
 #include "QIHotKeyEdit.h"
+#include "VBoxRegistrationDlg.h"
 
 #include <qapplication.h>
@@ -204,4 +205,18 @@
             if (sKey.startsWith ("GUI/"))
             {
+                if (!sVal.isEmpty() &&
+                    sKey == VBoxDefs::GUI_RegistrationDlgWinID)
+                {
+                    if (sVal == QString ("%1")
+                        .arg (qApp->mainWidget()->winId()))
+                    {
+                        *allowChange = TRUE;
+                        QApplication::postEvent (&global, new VBoxShowRegDlgEvent());
+                    }
+                    else
+                        *allowChange = FALSE;
+                    return S_OK;
+                }
+
                 /* try to set the global setting to check its syntax */
                 VBoxGlobalSettings gs (false /* non-null */);
@@ -654,4 +669,5 @@
     : valid (false)
     , selector_wnd (0), console_wnd (0)
+    , mRegDlg (0)
     , media_enum_thread (0)
     , verString ("1.0")
@@ -1627,4 +1643,15 @@
 }
 #endif
+
+void VBoxGlobal::showRegistrationDialog()
+{
+    /* check if the registration already passed */
+    if (virtualBox().GetExtraData (VBoxDefs::GUI_RegistrationTryLeft) == "0")
+        return;
+
+    /* store the winid of main app wgt to ensure only one reg dlg running */
+    virtualBox().SetExtraData (VBoxDefs::GUI_RegistrationDlgWinID,
+                               QString ("%1").arg (qApp->mainWidget()->winId()));
+}
 
 /**
@@ -3428,4 +3455,16 @@
             return true;
         }
+        case VBoxDefs::ShowRegDlgEventType:
+        {
+            /* show unique registration dialog */
+            if (!mRegDlg)
+            {
+                VBoxRegistrationDlg *dlg = new VBoxRegistrationDlg();
+                dlg->setup (&mRegDlg, "http://www.innotek.de/register762.php");
+                Assert (dlg == mRegDlg);
+                mRegDlg->show();
+            }
+            return true;
+        }
         case VBoxDefs::SessionStateChangeEventType:
         {
@@ -3719,4 +3758,6 @@
     if (selector_wnd)
         delete selector_wnd;
+    if (mRegDlg)
+        delete mRegDlg;
 
     /* ensure CGuestOSType objects are no longer used */
Index: trunk/src/VBox/Frontends/VirtualBox/src/VBoxProblemReporter.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/VBoxProblemReporter.cpp	(revision 5021)
+++ trunk/src/VBox/Frontends/VirtualBox/src/VBoxProblemReporter.cpp	(revision 5022)
@@ -1404,4 +1404,26 @@
 }
 
+void VBoxProblemReporter::cannotConnectRegister (QWidget *aParent,
+                                                 const QString &aURL,
+                                                 const QString &aReason)
+{
+    message (aParent, Error,
+             tr ("<p>Failed to connect to the VirtualBox network "
+                 "registration form "
+                 "<nobr><a href=\"%1\">%2</a>.</nobr></p><p>%3</p>")
+                 .arg (aURL).arg (aURL).arg (aReason));
+}
+
+void VBoxProblemReporter::showRegisterResult (QWidget *aParent,
+                                              const QString &aResult)
+{
+    aResult == "OK" ?
+        message (aParent, Info,
+                 tr ("<p><nobr>You have successfully registered with innotek. "
+                     "Thank you for registration.</nobr></p>")) :
+        message (aParent, Error,
+                 tr ("<p>Registration failed (%1)</p>").arg (aResult));
+}
+
 /** @return false if the dialog wasn't actually shown (i.e. it was autoconfirmed) */
 bool VBoxProblemReporter::remindAboutInputCapture()
Index: trunk/src/VBox/Frontends/VirtualBox/src/main.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/main.cpp	(revision 5021)
+++ trunk/src/VBox/Frontends/VirtualBox/src/main.cpp	(revision 5022)
@@ -231,7 +231,10 @@
             if (vboxGlobal().isVMConsoleProcess())
             {
-                a.setMainWidget( &vboxGlobal().consoleWnd());
+                a.setMainWidget (&vboxGlobal().consoleWnd());
                 if (vboxGlobal().startMachine (vboxGlobal().managedVMUuid()))
+                {
+                    vboxGlobal().showRegistrationDialog();
                     rc = a.exec();
+                }
             }
             else if (noSelector)
@@ -242,4 +245,5 @@
             {
                 a.setMainWidget (&vboxGlobal().selectorWnd());
+                vboxGlobal().showRegistrationDialog();
                 vboxGlobal().selectorWnd().show();
                 vboxGlobal().startEnumeratingMedia();
