Index: /trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp	(revision 23934)
+++ /trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp	(revision 23935)
@@ -572,14 +572,14 @@
     /* try to find the given machine */
     ComPtr <IMachine> machine;
-    Bstr uuid (a->argv[0]);
-    if (!Guid(uuid).isEmpty())
-    {
-        CHECK_ERROR(a->virtualBox, GetMachine(uuid, machine.asOutParam()));
+    Bstr machineuuid (a->argv[0]);
+    if (!Guid(machineuuid).isEmpty())
+    {
+        CHECK_ERROR(a->virtualBox, GetMachine(machineuuid, machine.asOutParam()));
     }
     else
     {
-        CHECK_ERROR(a->virtualBox, FindMachine(uuid, machine.asOutParam()));
+        CHECK_ERROR(a->virtualBox, FindMachine(machineuuid, machine.asOutParam()));
         if (SUCCEEDED (rc))
-            machine->COMGETTER(Id)(uuid.asOutParam());
+            machine->COMGETTER(Id)(machineuuid.asOutParam());
     }
     if (FAILED (rc))
@@ -587,5 +587,5 @@
 
     /* open a session for the VM */
-    CHECK_ERROR_RET(a->virtualBox, OpenExistingSession(a->session, uuid), 1);
+    CHECK_ERROR_RET(a->virtualBox, OpenExistingSession(a->session, machineuuid), 1);
 
     do
@@ -1121,4 +1121,5 @@
         else if (!strcmp(a->argv[1], "dvdattach"))
         {
+            Bstr uuid;
             if (a->argc != 3)
             {
@@ -1153,5 +1154,5 @@
             {
                 /* first assume it's a UUID */
-                Bstr uuid(a->argv[2]);
+                uuid = a->argv[2];
                 rc = a->virtualBox->GetDVDImage(uuid, dvdMedium.asOutParam());
                 if (FAILED(rc) || !dvdMedium)
@@ -1184,4 +1185,5 @@
         else if (!strcmp(a->argv[1], "floppyattach"))
         {
+            Bstr uuid;
             if (a->argc != 3)
             {
@@ -1215,5 +1217,5 @@
             {
                 /* first assume it's a UUID */
-                Bstr uuid(a->argv[2]);
+                uuid = a->argv[2];
                 rc = a->virtualBox->GetFloppyImage(uuid, floppyMedium.asOutParam());
                 if (FAILED(rc) || !floppyMedium)
