Index: /trunk/include/VBox/com/com.h
===================================================================
--- /trunk/include/VBox/com/com.h	(revision 42384)
+++ /trunk/include/VBox/com/com.h	(revision 42385)
@@ -73,10 +73,12 @@
  *  this method will return VERR_BUFFER_OVERFLOW.
  *
- *  @param aDir     Buffer to store the directory string in UTF-8 encoding.
- *  @param aDirLen  Length of the supplied buffer including space for the
- *                  terminating null character, in bytes.
- *  @return         VBox status code.
+ *  @param aDir        Buffer to store the directory string in UTF-8 encoding.
+ *  @param aDirLen     Length of the supplied buffer including space for the
+ *                     terminating null character, in bytes.
+ *  @param fCreateDir  Flag whether to create the returned directory on success if it
+ *                     doesn't exist.
+ *  @return            VBox status code.
  */
-int GetVBoxUserHomeDirectory(char *aDir, size_t aDirLen);
+int GetVBoxUserHomeDirectory(char *aDir, size_t aDirLen, bool fCreateDir = true);
 
 /**
Index: /trunk/src/VBox/Main/glue/com.cpp
===================================================================
--- /trunk/src/VBox/Main/glue/com.cpp	(revision 42384)
+++ /trunk/src/VBox/Main/glue/com.cpp	(revision 42385)
@@ -182,5 +182,5 @@
 #endif // VBOX_WITH_XPCOM
 
-int GetVBoxUserHomeDirectory(char *aDir, size_t aDirLen)
+int GetVBoxUserHomeDirectory(char *aDir, size_t aDirLen, bool fCreateDir)
 {
     AssertReturn(aDir, VERR_INVALID_POINTER);
@@ -211,5 +211,5 @@
         /* ensure the home directory exists */
         if (RT_SUCCESS(vrc))
-            if (!RTDirExists(aDir))
+            if (!RTDirExists(aDir) && fCreateDir)
                 vrc = RTDirCreateFullPath(aDir, 0700);
     }
