Index: trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic1.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic1.cpp	(revision 72183)
+++ trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic1.cpp	(revision 72185)
@@ -179,5 +179,7 @@
 
 UIWizardNewVMPage1::UIWizardNewVMPage1(const QString &strGroup)
-    : m_strGroup(strGroup)
+    : m_pNameAndSystemEditor(0)
+    , m_strGroup(strGroup)
+
 {
     CHost host = vboxGlobal().host();
@@ -196,7 +198,10 @@
         if (strNewName.contains(gs_OSTypePattern[i].pattern))
         {
-            m_pNameAndSystemEditor->blockSignals(true);
-            m_pNameAndSystemEditor->setType(vboxGlobal().vmGuestOSType(gs_OSTypePattern[i].pcstId));
-            m_pNameAndSystemEditor->blockSignals(false);
+            if (m_pNameAndSystemEditor)
+            {
+                m_pNameAndSystemEditor->blockSignals(true);
+                m_pNameAndSystemEditor->setType(vboxGlobal().vmGuestOSType(gs_OSTypePattern[i].pcstId));
+                m_pNameAndSystemEditor->blockSignals(false);
+            }
             break;
         }
@@ -207,14 +212,19 @@
     /* If the user manually edited the OS type, we didn't want our automatic OS type guessing anymore.
      * So simply disconnect the text-edit signal. */
-    m_pNameAndSystemEditor->disconnect(SIGNAL(sigNameChanged(const QString &)), thisImp(), SLOT(sltNameChanged(const QString &)));
-}
-
-bool UIWizardNewVMPage1::machineFolderCreated()
-{
-    return !m_strMachineFolder.isEmpty();
-}
+    if (m_pNameAndSystemEditor)
+        m_pNameAndSystemEditor->disconnect(SIGNAL(sigNameChanged(const QString &)), thisImp(), SLOT(sltNameChanged(const QString &)));
+}
+
+// bool UIWizardNewVMPage1::machineFolderCreated()
+// {
+//     return !m_strMachineFolder.isEmpty();
+// }
 
 void UIWizardNewVMPage1::composeMachineFilePath()
 {
+    if (!m_pNameAndSystemEditor)
+        return;
+    if (m_pNameAndSystemEditor->name().isEmpty() || m_pNameAndSystemEditor->path().isEmpty())
+        return;
     /* Get VBox: */
     CVirtualBox vbox = vboxGlobal().virtualBox();
@@ -239,5 +249,5 @@
         return false;
     /* Cleanup previosly created folder if any: */
-    if (machineFolderCreated() && !cleanupMachineFolder())
+    if (!cleanupMachineFolder())
     {
         msgCenter().cannotRemoveMachineFolder(m_strMachineFolder, thisImp());
@@ -261,4 +271,5 @@
         return false;
     }
+    m_strCreatedFolder = m_strMachineFolder;
     return true;
 }
@@ -267,13 +278,45 @@
 {
     /* Make sure folder was previosly created: */
-    if (m_strMachineFolder.isEmpty())
-        return false;
-    /* Try to cleanup folder (and it's predecessors): */
-    bool fMachineFolderRemoved = QDir().rmpath(m_strMachineFolder);
-    /* Reset machine folder value: */
-    if (fMachineFolderRemoved)
-        m_strMachineFolder = QString();
-    /* Return cleanup result: */
-    return fMachineFolderRemoved;
+    if (!m_strCreatedFolder.isEmpty() && m_strCreatedFolder != m_strMachineFolder)
+    {
+        /* Try to cleanup folder (and it's predecessors): */
+        bool fMachineFolderRemoved = QDir().rmpath(m_strCreatedFolder);
+        /* Reset machine folder value: */
+        if (fMachineFolderRemoved)
+            m_strCreatedFolder = QString();
+        /* Return cleanup result: */
+        return fMachineFolderRemoved;
+    }
+    return true;
+}
+
+QString UIWizardNewVMPage1::machineFilePath() const
+{
+    return m_strMachineFilePath;
+}
+
+void UIWizardNewVMPage1::setMachineFilePath(const QString &strMachineFilePath)
+{
+    m_strMachineFilePath = strMachineFilePath;
+}
+
+QString UIWizardNewVMPage1::machineFolder() const
+{
+    return m_strMachineFolder;
+}
+
+void UIWizardNewVMPage1::setMachineFolder(const QString &strMachineFolder)
+{
+    m_strMachineFolder = strMachineFolder;
+}
+
+QString UIWizardNewVMPage1::machineBaseName() const
+{
+    return m_strMachineBaseName;
+}
+
+void UIWizardNewVMPage1::setMachineBaseName(const QString &strMachineBaseName)
+{
+    m_strMachineBaseName = strMachineBaseName;
 }
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic1.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic1.h	(revision 72183)
+++ trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic1.h	(revision 72185)
@@ -39,23 +39,24 @@
 
     /* Helping stuff: */
-    bool machineFolderCreated();
+    //bool machineFolderCreated();
     bool createMachineFolder();
     bool cleanupMachineFolder();
 
-    QString machineFilePath() const { return m_strMachineFilePath; }
-    void setMachineFilePath(const QString &strMachineFilePath) { m_strMachineFilePath = strMachineFilePath; }
+    QString machineFilePath() const;
+    void setMachineFilePath(const QString &strMachineFilePath);
 
-    /** Returns the machine folder value. */
-    QString machineFolder() const { return m_strMachineFolder; }
-    /** Defines the @a strMachineFolder value. */
-    void setMachineFolder(const QString &strMachineFolder) { m_strMachineFolder = strMachineFolder; }
+    QString machineFolder() const;
+    void setMachineFolder(const QString &strMachineFolder);
 
-    /** Returns the machine base-name value. */
-    QString machineBaseName() const { return m_strMachineBaseName; }
-    /** Defines the @a strMachineBaseName value. */
-    void setMachineBaseName(const QString &strMachineBaseName) { m_strMachineBaseName = strMachineBaseName; }
+    QString machineBaseName() const;
+    void setMachineBaseName(const QString &strMachineBaseName);
 
     /** calls CVirtualBox::ComposeMachineFilename(...) and sets related member variables */
     void composeMachineFilePath();
+
+    /** Provides a path selector and a line edit field for path and name entry. */
+    UINameAndSystemEditor *m_pNameAndSystemEditor;
+
+private:
 
     /** Full path (including the file name) of the machine's configuration file. */
@@ -63,9 +64,9 @@
     /** Path of the folder hosting the machine's configuration file. Generated from m_strMachineFilePath. */
     QString m_strMachineFolder;
+    /** Path of the folder created by this wizard page. Used to remove previously created folders etc. */
+    QString m_strCreatedFolder;
     /** Base name of the machine is generated from the m_strMachineFilePath. */
     QString m_strMachineBaseName;
 
-    /** Provides a path selector and a line edit field for path and name entry. */
-    UINameAndSystemEditor *m_pNameAndSystemEditor;
 
     QString m_strGroup;
Index: trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageExpert.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageExpert.cpp	(revision 72183)
+++ trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageExpert.cpp	(revision 72185)
@@ -138,4 +138,6 @@
     connect(m_pNameAndSystemEditor, &UINameAndSystemEditor::sigNameChanged,
             this, &UIWizardNewVMPageExpert::sltNameChanged);
+    connect(m_pNameAndSystemEditor, &UINameAndSystemEditor::sigPathChanged,
+            this, &UIWizardNewVMPageExpert::sltPathChanged);
     connect(m_pNameAndSystemEditor, &UINameAndSystemEditor::sigOsTypeChanged,
             this, &UIWizardNewVMPageExpert::sltOsTypeChanged);
@@ -179,6 +181,12 @@
     m_pRamEditor->setValue(type.GetRecommendedRAM());
 
-    /* Broadcast complete-change: */
-    emit completeChanged();
+    composeMachineFilePath();
+    /* Broadcast complete-change: */
+    emit completeChanged();
+}
+
+void UIWizardNewVMPageExpert::sltPathChanged(const QString &strNewPath)
+{
+    composeMachineFilePath();
 }
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageExpert.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageExpert.h	(revision 72183)
+++ trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageExpert.h	(revision 72185)
@@ -59,4 +59,5 @@
     /* Handlers: */
     void sltNameChanged(const QString &strNewText);
+    void sltPathChanged(const QString &strNewPath);
     void sltOsTypeChanged();
     void sltRamSliderValueChanged();
