Index: /trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UINameAndSystemEditor.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UINameAndSystemEditor.cpp	(revision 90032)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UINameAndSystemEditor.cpp	(revision 90033)
@@ -386,5 +386,5 @@
 
     /* Notify listeners about this change: */
-    emit sigOSFamilyChanged();
+    emit sigOSFamilyChanged(m_strFamilyId);
 }
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UINameAndSystemEditor.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UINameAndSystemEditor.h	(revision 90032)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UINameAndSystemEditor.h	(revision 90033)
@@ -70,5 +70,5 @@
     void sigOsTypeChanged();
     /** Notifies listeners about VM OS family change. */
-    void sigOSFamilyChanged();
+    void sigOSFamilyChanged(const QString &strFamilyId);
 
 public:
Index: /trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.cpp	(revision 90032)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.cpp	(revision 90033)
@@ -61,4 +61,5 @@
     , m_iSASCount(0)
     , m_iUSBCount(0)
+    , m_fInstallGuestAdditions(false)
 {
 #ifndef VBOX_WS_MAC
@@ -714,4 +715,24 @@
 }
 
+const QString &UIWizardNewVM::guestOSFamilyId() const
+{
+    return m_strGuestOSFamilyId;
+}
+
+void UIWizardNewVM::setGuestOSFamilyId(const QString &strGuestOSFamilyId)
+{
+    m_strGuestOSFamilyId = strGuestOSFamilyId;
+}
+
+bool UIWizardNewVM::installGuestAdditions() const
+{
+    return m_fInstallGuestAdditions;
+}
+
+void UIWizardNewVM::setInstallGuestAdditions(bool fInstallGA)
+{
+    m_fInstallGuestAdditions = fInstallGA;
+}
+
 const UIUnattendedInstallData &UIWizardNewVM::unattendedInstallData() const
 {
@@ -746,6 +767,6 @@
 }
 
-// bool UIWizardNewVM::isGuestOSTypeWindows() const
-// {
-//     return getStringFieldValue("guestOSFamiyId").contains("windows", Qt::CaseInsensitive);
-// }
+bool UIWizardNewVM::isGuestOSTypeWindows() const
+{
+    return m_strGuestOSFamilyId.contains("windows", Qt::CaseInsensitive);
+}
Index: /trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.h	(revision 90032)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.h	(revision 90033)
@@ -83,5 +83,5 @@
     const UIUnattendedInstallData &unattendedInstallData() const;
     bool isUnattendedEnabled() const;
-    //bool isGuestOSTypeWindows() const;
+    bool isGuestOSTypeWindows() const;
     CMedium &virtualDisk();
     void setVirtualDisk(const CMedium &medium);
@@ -105,4 +105,10 @@
     void setDetectedOSTypeId(const QString &strDetectedOSTypeId);
 
+    const QString &guestOSFamilyId() const;
+    void setGuestOSFamilyId(const QString &strGuestOSFamilyId);
+
+    bool installGuestAdditions() const;
+    void setInstallGuestAdditions(bool fInstallGA);
+
 protected:
 
@@ -116,7 +122,4 @@
     void configureVM(const QString &strGuestTypeId, const CGuestOSType &comGuestType);
     bool attachDefaultDevices(const CGuestOSType &comGuestType);
-
-    friend class UIWizardNewVMPageDisk;
-    friend class UIWizardNewVMPageExpert;
 
 private slots:
@@ -165,4 +168,10 @@
     /** Type Id od the OS detected from the ISO file by IUnattended. */
     QString m_strDetectedOSTypeId;
+
+    /** Holds the VM OS family ID. */
+    QString  m_strGuestOSFamilyId;
+
+    /** True if guest additions are to be installed during unattended install. */
+    bool m_fInstallGuestAdditions;
 };
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMNameOSTypePageBasic.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMNameOSTypePageBasic.cpp	(revision 90032)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMNameOSTypePageBasic.cpp	(revision 90033)
@@ -293,11 +293,4 @@
 // }
 
-// QString UIWizardNewVMNameOSTypePage::guestOSFamiyId() const
-// {
-//     if (!m_pNameAndSystemEditor)
-//         return QString();
-//     return m_pNameAndSystemEditor->familyId();
-// }
-
 
 // QString UIWizardNewVMNameOSTypePage::ISOFilePath() const
@@ -392,4 +385,5 @@
         connect(m_pNameAndSystemEditor, &UINameAndSystemEditor::sigOsTypeChanged, this, &UIWizardNewVMNameOSTypePageBasic::sltOsTypeChanged);
         connect(m_pNameAndSystemEditor, &UINameAndSystemEditor::sigImageChanged, this, &UIWizardNewVMNameOSTypePageBasic::sltISOPathChanged);
+        connect(m_pNameAndSystemEditor, &UINameAndSystemEditor::sigOSFamilyChanged, this, &UIWizardNewVMNameOSTypePageBasic::sltGuestOSFamilChanged);
     }
 }
@@ -405,5 +399,4 @@
 void UIWizardNewVMNameOSTypePageBasic::sltNameChanged(const QString &strNewName)
 {
-    Q_UNUSED(strNewName);
     UIWizardNewVMNameOSTypePage::onNameChanged(m_pNameAndSystemEditor, strNewName);
     UIWizardNewVMNameOSTypePage::composeMachineFilePath(m_pNameAndSystemEditor, m_pWizard);
@@ -451,13 +444,13 @@
     if (m_pNameAndSystemEditor)
         m_pNameAndSystemEditor->setFocus();
-    //setSkipCheckBoxEnable();
-}
-
-void UIWizardNewVMNameOSTypePageBasic::cleanupPage()
-{
-    // cleanupMachineFolder();
-    // /* Call to base-class: */
-    // UIWizardPage::cleanupPage();
-}
+    setSkipCheckBoxEnable();
+}
+
+// void UIWizardNewVMNameOSTypePageBasic::cleanupPage()
+// {
+//     cleanupMachineFolder();
+//     /* Call to base-class: */
+//     UIWizardPage::cleanupPage();
+// }
 
 bool UIWizardNewVMNameOSTypePageBasic::validatePage()
@@ -476,6 +469,12 @@
     if (fileInfo.exists() && fileInfo.isReadable())
         uiCommon().updateRecentlyUsedMediumListAndFolder(UIMediumDeviceType_DVD, strPath);
-    // setSkipCheckBoxEnable();
-    // emit completeChanged();
+    setSkipCheckBoxEnable();
+    emit completeChanged();
+}
+
+void UIWizardNewVMNameOSTypePageBasic::sltGuestOSFamilChanged(const QString &strGuestOSFamilyId)
+{
+    if (m_pWizard)
+        m_pWizard->setGuestOSFamilyId(strGuestOSFamilyId);
 }
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMNameOSTypePageBasic.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMNameOSTypePageBasic.h	(revision 90032)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMNameOSTypePageBasic.h	(revision 90033)
@@ -102,4 +102,5 @@
     void sltOsTypeChanged();
     void sltISOPathChanged(const QString &strPath);
+    void sltGuestOSFamilChanged(const QString &strGuestOSFamilyId);
 
 private:
@@ -112,10 +113,9 @@
     void createConnections();
     void initializePage();
-    void cleanupPage();
+    //void cleanupPage();
     QWidget *createNameOSTypeWidgets();
     void markWidgets() const;
     void setSkipCheckBoxEnable();
     bool isUnattendedEnabled() const;
-
 
     UIWizardNewVM *m_pWizard;
Index: /trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMUnattendedPageBasic.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMUnattendedPageBasic.cpp	(revision 90032)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMUnattendedPageBasic.cpp	(revision 90033)
@@ -84,10 +84,4 @@
 // }
 
-// bool UIWizardNewVMUnattendedPage::installGuestAdditions() const
-// {
-//     if (!m_pGAInstallationISOContainer)
-//         return false;
-//     return m_pGAInstallationISOContainer->isChecked();
-// }
 
 // void UIWizardNewVMUnattendedPage::setInstallGuestAdditions(bool fInstallGA)
@@ -118,40 +112,19 @@
 
 
-// bool UIWizardNewVMUnattendedPage::checkGAISOFile() const
-// {
-//     if (!m_pGAISOFilePathSelector)
-//         return false;
-//     /* GA ISO selector should not be empty since GA install check box is checked at this point: */
-//     const QString &strPath = m_pGAISOFilePathSelector->path();
-//     if (strPath.isNull() || strPath.isEmpty())
-//         return false;
-//     QFileInfo fileInfo(strPath);
-//     if (!fileInfo.exists() || !fileInfo.isReadable())
-//         return false;
-//     return true;
-// }
-
-// void UIWizardNewVMUnattendedPage::markWidgets() const
-// {
-//     if (installGuestAdditions())
-//         m_pGAISOFilePathSelector->mark(!checkGAISOFile());
-// }
-
-
-// void UIWizardNewVMUnattendedPage::disableEnableGAWidgets(bool fEnabled)
-// {
-//     if (m_pGAISOPathLabel)
-//         m_pGAISOPathLabel->setEnabled(fEnabled);
-//     if (m_pGAISOFilePathSelector)
-//         m_pGAISOFilePathSelector->setEnabled(fEnabled);
-// }
-
-// void UIWizardNewVMUnattendedPage::disableEnableProductKeyWidgets(bool fEnabled)
-// {
-//     if (m_pProductKeyLabel)
-//         m_pProductKeyLabel->setEnabled(fEnabled);
-//     if (m_pProductKeyLineEdit)
-//         m_pProductKeyLineEdit->setEnabled(fEnabled);
-// }
+bool UIWizardNewVMUnattendedPage::checkGAISOFile(UIFilePathSelector *pGAISOFilePathSelector)
+{
+    if (!pGAISOFilePathSelector)
+        return false;
+    /* GA ISO selector should not be empty since GA install check box is checked at this point: */
+    const QString &strPath = pGAISOFilePathSelector->path();
+    if (strPath.isNull() || strPath.isEmpty())
+        return false;
+    QFileInfo fileInfo(strPath);
+    if (!fileInfo.exists() || !fileInfo.isReadable())
+        return false;
+    return true;
+}
+
+
 
 // bool UIWizardNewVMUnattendedPage::startHeadless() const
@@ -162,11 +135,4 @@
 // }
 
-
-// bool UIWizardNewVMUnattendedPage::isGAInstallEnabled() const
-// {
-//     if (m_pGAInstallationISOContainer && m_pGAInstallationISOContainer->isChecked())
-//         return true;
-//     return false;
-// }
 
 UIWizardNewVMUnattendedPageBasic::UIWizardNewVMUnattendedPageBasic()
@@ -184,4 +150,5 @@
     , m_pProductKeyLabel(0)
 {
+    m_pWizard = qobject_cast<UIWizardNewVM*>(wizard());
     prepare();
 }
@@ -199,19 +166,18 @@
     pMainLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::Fixed, QSizePolicy::Expanding), 3, 0, 1, 2);
 
-
-    // createConnections();
+     createConnections();
 }
 
 void UIWizardNewVMUnattendedPageBasic::createConnections()
 {
-    // if (m_pUserNamePasswordEditor)
-    //     connect(m_pUserNamePasswordEditor, &UIUserNamePasswordEditor::sigSomeTextChanged,
-    //             this, &UIWizardNewVMUnattendedPageBasic::completeChanged);
-    // if (m_pGAISOFilePathSelector)
-    //     connect(m_pGAISOFilePathSelector, &UIFilePathSelector::pathChanged,
-    //             this, &UIWizardNewVMUnattendedPageBasic::sltGAISOPathChanged);
-    // if (m_pGAISOFilePathSelector)
-    //     connect(m_pGAInstallationISOContainer, &QGroupBox::toggled,
-    //             this, &UIWizardNewVMUnattendedPageBasic::sltInstallGACheckBoxToggle);
+    if (m_pUserNamePasswordEditor)
+        connect(m_pUserNamePasswordEditor, &UIUserNamePasswordEditor::sigSomeTextChanged,
+                this, &UIWizardNewVMUnattendedPageBasic::completeChanged);
+    if (m_pGAISOFilePathSelector)
+        connect(m_pGAISOFilePathSelector, &UIFilePathSelector::pathChanged,
+                this, &UIWizardNewVMUnattendedPageBasic::sltGAISOPathChanged);
+    if (m_pGAISOFilePathSelector)
+        connect(m_pGAInstallationISOContainer, &QGroupBox::toggled,
+                this, &UIWizardNewVMUnattendedPageBasic::sltInstallGACheckBoxToggle);
 }
 
@@ -254,27 +220,17 @@
 void UIWizardNewVMUnattendedPageBasic::initializePage()
 {
-    // disableEnableProductKeyWidgets(isProductKeyWidgetEnabled());
-    // disableEnableGAWidgets(m_pGAInstallationISOContainer ? m_pGAInstallationISOContainer->isChecked() : false);
-    // retranslateUi();
+    disableEnableProductKeyWidgets(isProductKeyWidgetEnabled());
+    disableEnableGAWidgets(m_pGAInstallationISOContainer ? m_pGAInstallationISOContainer->isChecked() : false);
+    retranslateUi();
 }
 
 bool UIWizardNewVMUnattendedPageBasic::isComplete() const
 {
-//     markWidgets();
-//     if (isGAInstallEnabled() && !checkGAISOFile())
-//         return false;
-// //     bool fIsComplete = true;
-// //     if (!checkGAISOFile())
-// //     {
-// //         m_pToolBox->setItemIcon(ToolBoxItems_GAInstall, UIIconPool::iconSet(":/status_error_16px.png"));
-// //         fIsComplete = false;
-// //     }
-//     if (m_pUserNamePasswordEditor && !m_pUserNamePasswordEditor->isComplete())
-//         return false;
-// //     {
-// //         m_pToolBox->setItemIcon(ToolBoxItems_UserNameHostname, UIIconPool::iconSet(":/status_error_16px.png"));
-// //         fIsComplete = false;
-// //     }
-// //     return fIsComplete;
+    markWidgets();
+    if (m_pWizard && m_pWizard->installGuestAdditions() &&
+        !UIWizardNewVMUnattendedPage::checkGAISOFile(m_pGAISOFilePathSelector))
+        return false;
+    if (m_pUserNamePasswordEditor && !m_pUserNamePasswordEditor->isComplete())
+        return false;
     return true;
 }
@@ -286,15 +242,13 @@
 void UIWizardNewVMUnattendedPageBasic::showEvent(QShowEvent *pEvent)
 {
-    Q_UNUSED(pEvent);
-    // if (m_pToolBox)
-    //     m_pToolBox->setItemEnabled(ToolBoxItems_ProductKey, isProductKeyWidgetEnabled());
-    //UIWizardPage::showEvent(pEvent);
+    UINativeWizardPage::showEvent(pEvent);
 }
 
 void UIWizardNewVMUnattendedPageBasic::sltInstallGACheckBoxToggle(bool fEnabled)
 {
-    Q_UNUSED(fEnabled);
-    // disableEnableGAWidgets(fEnabled);
-    // emit completeChanged();
+    disableEnableGAWidgets(fEnabled);
+    if (m_pWizard)
+        m_pWizard->setInstallGuestAdditions(fEnabled);
+    emit completeChanged();
 }
 
@@ -302,12 +256,11 @@
 {
     Q_UNUSED(strPath);
-    // emit completeChanged();
+    emit completeChanged();
 }
 
 bool UIWizardNewVMUnattendedPageBasic::isProductKeyWidgetEnabled() const
 {
-    // UIWizardNewVM *pWizard = qobject_cast<UIWizardNewVM*>(wizard());
-    // if (!pWizard || !pWizard->isUnattendedEnabled() || !pWizard->isGuestOSTypeWindows())
-    //     return false;
+    if (!m_pWizard || !m_pWizard->isUnattendedEnabled() || !m_pWizard->isGuestOSTypeWindows())
+        return false;
     return true;
 }
@@ -419,2 +372,24 @@
     return m_pGAInstallationISOContainer;
 }
+
+void UIWizardNewVMUnattendedPageBasic::disableEnableGAWidgets(bool fEnabled)
+{
+    if (m_pGAISOPathLabel)
+        m_pGAISOPathLabel->setEnabled(fEnabled);
+    if (m_pGAISOFilePathSelector)
+        m_pGAISOFilePathSelector->setEnabled(fEnabled);
+}
+
+void UIWizardNewVMUnattendedPageBasic::disableEnableProductKeyWidgets(bool fEnabled)
+{
+    if (m_pProductKeyLabel)
+        m_pProductKeyLabel->setEnabled(fEnabled);
+    if (m_pProductKeyLineEdit)
+        m_pProductKeyLineEdit->setEnabled(fEnabled);
+}
+
+void UIWizardNewVMUnattendedPageBasic::markWidgets() const
+{
+    if (m_pWizard && m_pWizard->installGuestAdditions())
+        m_pGAISOFilePathSelector->mark(!UIWizardNewVMUnattendedPage::checkGAISOFile(m_pGAISOFilePathSelector));
+}
Index: /trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMUnattendedPageBasic.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMUnattendedPageBasic.h	(revision 90032)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMUnattendedPageBasic.h	(revision 90033)
@@ -32,15 +32,14 @@
 class QLabel;
 class QLineEdit;
-class QToolBox;
 class QIRichTextLabel;
 class UIFilePathSelector;
 class UIUserNamePasswordEditor;
+class UIWizardNewVM;
 struct UIUnattendedInstallData;
 
 
-// class UIWizardNewVMUnattendedPage : public UIWizardPageBase
-// {
-// public:
-
+namespace UIWizardNewVMUnattendedPage
+{
+    bool checkGAISOFile(UIFilePathSelector *pGAISOFilePathSelector);
 //     UIWizardNewVMUnattendedPage();
 
@@ -53,6 +52,4 @@
 //         QString hostname() const;
 //         void setHostname(const QString &strHostName);
-//         bool installGuestAdditions() const;
-//         void setInstallGuestAdditions(bool fInstallGA);
 //         QString guestAdditionsISOPath() const;
 //         void setGuestAdditionsISOPath(const QString &strISOPath);
@@ -60,29 +57,15 @@
 //     /** @} */
 
-// protected:
-//     enum
-//     {
-//         ToolBoxItems_UserNameHostname,
-//         ToolBoxItems_GAInstall,
-//         ToolBoxItems_ProductKey
-//     };
-
 
 //     /** Returns false if ISO path selector is non empty but has invalid file path. */
 //     bool checkGAISOFile() const;
-//     void markWidgets() const;
+
 //     void retranslateWidgets();
-//     void disableEnableGAWidgets(bool fEnabled);
-//     void disableEnableProductKeyWidgets(bool fEnabled);
+
 
 //     bool startHeadless() const;
 
-//     bool isGAInstallEnabled() const;
 
-
-// private:
-
-//     friend class UIWizardNewVM;
-// };
+}
 
 class UIWizardNewVMUnattendedPageBasic : public UINativeWizardPage
@@ -118,9 +101,13 @@
     /** Returns true if we show the widgets for guest os product key. */
     bool isProductKeyWidgetEnabled() const;
+    void disableEnableProductKeyWidgets(bool fEnabled);
+    void disableEnableGAWidgets(bool fEnabled);
+    void markWidgets() const;
 
-    QIRichTextLabel *m_pLabel;
+    UIWizardNewVM *m_pWizard;
 
     /** @name Widgets
       * @{ */
+        QIRichTextLabel *m_pLabel;
         QGroupBox *m_pUserNameContainer;
         QGroupBox *m_pAdditionalOptionsContainer;
