Index: /trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxLA.cpp
===================================================================
--- /trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxLA.cpp	(revision 43583)
+++ /trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxLA.cpp	(revision 43584)
@@ -40,4 +40,15 @@
 #define LA_DO_ATTACH_AND_DETACH 4
 
+
+#define LA_UTCINFO_CLIENT_NAME      0
+#define LA_UTCINFO_CLIENT_IPADDR    1
+#define LA_UTCINFO_CLIENT_LOCATION  2
+#define LA_UTCINFO_CLIENT_OTHERINFO 3
+#define LA_UTCINFO_CLIENT_INFO_LAST 3
+
+#define LA_UTCINFO_PROP_NAME  0
+#define LA_UTCINFO_PROP_VALUE 1
+
+
 struct VBOXLACONTEXT
 {
@@ -67,5 +78,9 @@
         uint64_t u64LastNameTimestamp;
 
-        char *pszPropName;        /* The actual Client/%ID%/Name property name with client id. */
+        char *pszPropName;       /* The actual Client/%ID%/Name property name with client id. */
+        char *pszPropIPAddr;      /* The actual Client/%ID%/IPAddr property name with client id. */
+        char *pszPropLocation;   /* The actual Client/%ID%/Location property name with client id. */
+        char *pszPropOtherInfo;  /* The actual Client/%ID%/OtherInfo property name with client id. */
+
         char *pszPropAttach;      /* The actual Client/%ID%/Attach property name with client id. */
 
@@ -90,11 +105,23 @@
 static const char *g_pszPropActiveClient = "/VirtualBox/HostInfo/VRDP/ActiveClient";
 
-static const char *g_pszPropNameTemplate = "/VirtualBox/HostInfo/VRDP/Client/%u/Name";
 static const char *g_pszPropAttachTemplate = "/VirtualBox/HostInfo/VRDP/Client/%u/Attach";
 
 static const char *g_pszVolatileEnvironment = "Volatile Environment";
 
-static const WCHAR *g_pwszUTCINFOClientName = L"UTCINFO_CLIENTNAME";
 static const WCHAR *g_pwszClientName = L"CLIENTNAME";
+
+static const WCHAR *g_pwszUTCINFOClientInfo[] = {
+                                                  L"UTCINFO_CLIENTNAME",
+                                                  L"UTCINFO_CLIENTIPA",
+                                                  L"UTCINFO_CLIENTLOCATION",
+                                                  L"UTCINFO_CLIENTOTHERINFO"
+                                                };
+
+static const char *g_pszPropInfoTemplates[] = {
+                                                "/VirtualBox/HostInfo/VRDP/Client/%u/Name",
+                                                "/VirtualBox/HostInfo/VRDP/Client/%u/IPAddr",
+                                                "/VirtualBox/HostInfo/VRDP/Client/%u/Location",
+                                                "/VirtualBox/HostInfo/VRDP/Client/%u/OtherInfo"
+                                              };
 
 #ifdef RT_ARCH_AMD64
@@ -378,5 +405,5 @@
     LALOG(("LA: ExecuteActions leave\n"));
 }
-	
+
 static BOOL GetVolatileEnvironmentKey(WCHAR *pwszRegKey, DWORD cbRegKey)
 {
@@ -484,5 +511,5 @@
     DWORD dwType;
     lErr = RegQueryValueExW(hKey,
-                            g_pwszUTCINFOClientName,
+                            g_pwszUTCINFOClientInfo[LA_UTCINFO_CLIENT_NAME],
                             NULL,
                             &dwType,
@@ -517,5 +544,5 @@
 
     lErr = RegQueryValueExW(hKey,
-                            g_pwszUTCINFOClientName,
+                            g_pwszUTCINFOClientInfo[LA_UTCINFO_CLIENT_NAME],
                             NULL,
                             NULL,
@@ -602,32 +629,19 @@
 }
 
-static void laOnClientName(const char *pszClientName)
-{
-    /* pszClientName is UTF8, make an Unicode copy for registry. */
-    PRTUTF16 putf16UnicodeName = NULL;
-    size_t cchUnicodeName = 0;
-    int rc = RTStrToUtf16Ex(pszClientName, MAX_CLIENT_NAME_CHARS,
-                            &putf16UnicodeName, 0, &cchUnicodeName);
-
-    if (RT_FAILURE(rc))
-    {
-        LALOG(("LA: RTStrToUniEx failed %Rrc\n", rc));
-        return;
-    }
-
-    LALOG(("LA: unicode %d chars [%ls]\n", cchUnicodeName, putf16UnicodeName));
-
+static void laOnClientLocationInfo(char *pszClientInfo[][2])
+{
     /*
-     * Write the client name to:
-     * HKCU\Volatile Environment\UTCINFO_CLIENTNAME or
-     * HKCU\Volatile Environment\<SessionID>\UTCINFO_CLIENTNAME
+     * Write the client location info to:
+     * HKCU\Volatile Environment\<CLIENT_LOCATION_INFO> or
+     * HKCU\Volatile Environment\<SessionID>\<CLIENT_LOCATION_INFO>
      * depending on whether this is a Terminal Services or desktop session
      * respectively.
+     * The client location info are: Name, IPAddr, Location, OtherInfo
      */
+    unsigned int idx;
     WCHAR wszRegKey[REG_KEY_LEN];
     if (!GetVolatileEnvironmentKey(wszRegKey, sizeof(wszRegKey)))
     {
         LALOG(("LA: Failed to get 'Volatile Environment' registry key\n"));
-        RTUtf16Free(putf16UnicodeName);
         return;
     }
@@ -647,19 +661,37 @@
         LALOG(("LA: Failed to open key [%ls], error %lu\n",
                wszRegKey, lRet));
-        RTUtf16Free(putf16UnicodeName);
         return;
     }
 
-    DWORD nDataLength = (DWORD)((cchUnicodeName + 1) * sizeof(WCHAR));
-    lRet = RegSetValueExW(hKey,
-                          g_pwszUTCINFOClientName,
-                          0,
-                          REG_SZ,
-                          (BYTE *)putf16UnicodeName,
-                          nDataLength);
-
-    if (lRet != ERROR_SUCCESS)
-    {
-        LALOG(("LA: RegSetValueExW failed error %lu\n", lRet));
+    PRTUTF16 putf16UnicodeClientInfo[LA_UTCINFO_CLIENT_INFO_LAST + 1] = {NULL};
+    for (idx = 0; idx <= LA_UTCINFO_CLIENT_INFO_LAST; idx++)
+    {
+        if (pszClientInfo[idx][LA_UTCINFO_PROP_VALUE] == NULL)
+            break;
+
+        /* pszClientInfo is UTF8, make an Unicode copy for registry. */
+        size_t cchUnicodeClientInfo = 0;
+
+        int rc = RTStrToUtf16Ex(pszClientInfo[idx][LA_UTCINFO_PROP_VALUE], MAX_CLIENT_NAME_CHARS,
+                                &putf16UnicodeClientInfo[idx], 0, &cchUnicodeClientInfo);
+
+        if (RT_FAILURE(rc))
+        {
+            LALOG(("LA: RTStrToUniEx failed %Rrc\n", rc));
+            break;
+        }
+
+        DWORD nDataLength = (DWORD)((cchUnicodeClientInfo + 1) * sizeof(WCHAR));
+        lRet = RegSetValueExW(hKey,
+                              g_pwszUTCINFOClientInfo[idx],
+                              0,
+                              REG_SZ,
+                              (BYTE *)putf16UnicodeClientInfo[idx],
+                              nDataLength);
+
+        if (lRet != ERROR_SUCCESS)
+        {
+            LALOG(("LA: RegSetValueExW failed error %lu for %s \n", lRet, g_pwszUTCINFOClientInfo[idx]));
+        }
     }
 
@@ -668,10 +700,17 @@
     laBroadcastSettingChange();
 
-    /* Also, write the client name to the environment of this process, as it
+    /* Also, write these info (Name, IPAddr, Location and Other Info) to the environment of this process, as it
      * doesn't listen for WM_SETTINGCHANGE messages.
      */
-    SetEnvironmentVariableW(g_pwszUTCINFOClientName, putf16UnicodeName);
-
-    RTUtf16Free(putf16UnicodeName);
+
+    for (idx = 0; idx <= LA_UTCINFO_CLIENT_INFO_LAST; idx++)
+    {
+        if (putf16UnicodeClientInfo[idx] == NULL)
+            break;
+
+        SetEnvironmentVariableW(g_pwszUTCINFOClientInfo[idx], putf16UnicodeClientInfo[idx]);
+
+        RTUtf16Free(putf16UnicodeClientInfo[idx]);
+    }
 }
 
@@ -884,4 +923,11 @@
     int l;
 
+    char **pClientInfoMap[LA_UTCINFO_CLIENT_INFO_LAST + 1] = {
+                                                               &pCtx->activeClient.pszPropName,
+                                                               &pCtx->activeClient.pszPropIPAddr,
+                                                               &pCtx->activeClient.pszPropLocation,
+                                                               &pCtx->activeClient.pszPropOtherInfo,
+                                                             };
+
     pCtx->activeClient.u32LastAttach = ~0;
     pCtx->activeClient.u64LastAttachTimestamp = u64ActiveClientTS;
@@ -894,18 +940,26 @@
     pCtx->activeClient.u64LastNameTimestamp = u64ActiveClientTS;
 
-    if (pCtx->activeClient.pszPropName)
-    {
-        RTMemFree(pCtx->activeClient.pszPropName);
-        pCtx->activeClient.pszPropName = NULL;
-    }
-    if (u32ActiveClientId != 0)
-    {
-        l = RTStrAPrintf(&pCtx->activeClient.pszPropName,
-                         g_pszPropNameTemplate,
-                         u32ActiveClientId);
-        if (l == -1)
-        {
-            pCtx->activeClient.pszPropName = NULL;
-            rc = VERR_NO_MEMORY;
+    unsigned int idx;
+
+    for (idx = 0; idx <= LA_UTCINFO_CLIENT_INFO_LAST; idx++)
+    {
+        if (*pClientInfoMap[idx])
+        {
+            RTMemFree(*pClientInfoMap[idx]);
+            *pClientInfoMap[idx] = NULL;
+        }
+
+        if (u32ActiveClientId != 0)
+        {
+            l = RTStrAPrintf(pClientInfoMap[idx],
+                             g_pszPropInfoTemplates[idx],
+                             u32ActiveClientId);
+
+            if (l == -1)
+            {
+                *pClientInfoMap[idx] = NULL;
+                rc = VERR_NO_MEMORY;
+                break;
+            }
         }
     }
@@ -941,7 +995,10 @@
         {
             l = RTStrAPrintf(&pCtx->activeClient.pszPropWaitPattern,
-                             "%s|%s",
+                             "%s|%s|%s|%s|%s",
                              pCtx->activeClient.pszPropName,
-                             pCtx->activeClient.pszPropAttach);
+                             pCtx->activeClient.pszPropAttach,
+                             pCtx->activeClient.pszPropIPAddr,
+                             pCtx->activeClient.pszPropLocation,
+                             pCtx->activeClient.pszPropOtherInfo);
             if (l == -1)
             {
@@ -984,34 +1041,54 @@
 }
 
-static void laProcessName(VBOXLACONTEXT *pCtx)
+static void laProcessClientInfo(VBOXLACONTEXT *pCtx)
 {
     /* Check if the name was changed. */
     /* Get the name string and check if it was changed since last time.
-     * Write the name to the registry if changed.
+     * Write Client name, IPAddr, Location and Other Info to the registry if the name has changed.
      */
     uint64_t u64Timestamp = 0;
-    char *pszName = NULL;
-
-    int rc = laGetString(pCtx->u32GuestPropHandle,
-                         pCtx->activeClient.pszPropName,
+    int rc = VINF_SUCCESS;
+    unsigned int idx;
+
+    char *pClientInfoMap[][2] = {
+                                  {pCtx->activeClient.pszPropName, NULL},
+                                  {pCtx->activeClient.pszPropIPAddr, NULL},
+                                  {pCtx->activeClient.pszPropLocation, NULL},
+                                  {pCtx->activeClient.pszPropOtherInfo, NULL}
+                                 };
+
+    for (idx = 0; idx <= LA_UTCINFO_CLIENT_INFO_LAST; idx++)
+    {
+         rc = laGetString(pCtx->u32GuestPropHandle,
+                         pClientInfoMap[idx][LA_UTCINFO_PROP_NAME],
                          &u64Timestamp,
-                         &pszName);
-    if (RT_SUCCESS(rc))
-    {
-        LALOG(("LA: laProcessName: read [%s], at %lld\n",
-               pszName, u64Timestamp));
-
+                         &pClientInfoMap[idx][LA_UTCINFO_PROP_VALUE]);
+
+         LALOG(("LA: laProcessClientInfo: read [%s], at %lld\n",
+                pClientInfoMap[idx][LA_UTCINFO_PROP_VALUE], u64Timestamp));
+
+        if (RT_FAILURE(rc))
+        {
+            LALOG(("LA: laProcessClientInfo failed at %s\n", pClientInfoMap[idx][LA_UTCINFO_PROP_NAME]));
+            break;
+        }
+    }
+
+    if (pClientInfoMap[LA_UTCINFO_CLIENT_NAME][LA_UTCINFO_PROP_VALUE] != NULL)
+    {
         if (u64Timestamp != pCtx->activeClient.u64LastNameTimestamp)
         {
-            laOnClientName(pszName);
+            laOnClientLocationInfo(pClientInfoMap);
 
             pCtx->activeClient.u64LastNameTimestamp = u64Timestamp;
         }
-
-    }
-
-    if (pszName)
-    {
-        RTMemFree(pszName);
+    }
+
+    for (idx = 0; idx <= LA_UTCINFO_CLIENT_INFO_LAST; idx++)
+    {
+        if (pClientInfoMap[idx][LA_UTCINFO_PROP_VALUE])
+        {
+            RTMemFree(pClientInfoMap[idx][LA_UTCINFO_PROP_VALUE]);
+        }
     }
 }
@@ -1280,5 +1357,5 @@
                         laProcessAttach(pCtx);
 
-                        laProcessName(pCtx);
+                        laProcessClientInfo(pCtx);
 
                         laDoActions(pCtx);
Index: /trunk/src/VBox/Main/include/ConsoleImpl.h
===================================================================
--- /trunk/src/VBox/Main/include/ConsoleImpl.h	(revision 43583)
+++ /trunk/src/VBox/Main/include/ConsoleImpl.h	(revision 43584)
@@ -690,4 +690,7 @@
     void guestPropertiesVRDPUpdateClientAttach(uint32_t u32ClientId, bool fAttached);
     void guestPropertiesVRDPUpdateNameChange(uint32_t u32ClientId, const char *pszName);
+    void guestPropertiesVRDPUpdateIPAddrChange(uint32_t u32ClientId, const char *pszIPAddr);
+    void guestPropertiesVRDPUpdateLocationChange(uint32_t u32ClientId, const char *pszLocation);
+    void guestPropertiesVRDPUpdateOtherInfoChange(uint32_t u32ClientId, const char *pszOtherInfo);
     void guestPropertiesVRDPUpdateDisconnect(uint32_t u32ClientId);
 #endif
Index: /trunk/src/VBox/Main/src-client/ConsoleImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-client/ConsoleImpl.cpp	(revision 43583)
+++ /trunk/src/VBox/Main/src-client/ConsoleImpl.cpp	(revision 43584)
@@ -877,4 +877,61 @@
 }
 
+void Console::guestPropertiesVRDPUpdateIPAddrChange(uint32_t u32ClientId, const char *pszIPAddr)
+{
+    if (!guestPropertiesVRDPEnabled())
+        return;
+
+    LogFlowFunc(("\n"));
+
+    char szPropNm[256];
+    Bstr bstrReadOnlyGuest(L"RDONLYGUEST");
+
+    RTStrPrintf(szPropNm, sizeof(szPropNm), "/VirtualBox/HostInfo/VRDP/Client/%u/IPAddr", u32ClientId);
+    Bstr clientIPAddr(pszIPAddr);
+
+    mMachine->SetGuestProperty(Bstr(szPropNm).raw(),
+                               clientIPAddr.raw(),
+                               bstrReadOnlyGuest.raw());
+
+}
+
+void Console::guestPropertiesVRDPUpdateLocationChange(uint32_t u32ClientId, const char *pszLocation)
+{
+    if (!guestPropertiesVRDPEnabled())
+        return;
+
+    LogFlowFunc(("\n"));
+
+    char szPropNm[256];
+    Bstr bstrReadOnlyGuest(L"RDONLYGUEST");
+
+    RTStrPrintf(szPropNm, sizeof(szPropNm), "/VirtualBox/HostInfo/VRDP/Client/%u/Location", u32ClientId);
+    Bstr clientLocation(pszLocation);
+
+    mMachine->SetGuestProperty(Bstr(szPropNm).raw(),
+                               clientLocation.raw(),
+                               bstrReadOnlyGuest.raw());
+
+}
+
+void Console::guestPropertiesVRDPUpdateOtherInfoChange(uint32_t u32ClientId, const char *pszOtherInfo)
+{
+    if (!guestPropertiesVRDPEnabled())
+        return;
+
+    LogFlowFunc(("\n"));
+
+    char szPropNm[256];
+    Bstr bstrReadOnlyGuest(L"RDONLYGUEST");
+
+    RTStrPrintf(szPropNm, sizeof(szPropNm), "/VirtualBox/HostInfo/VRDP/Client/%u/OtherInfo", u32ClientId);
+    Bstr clientOtherInfo(pszOtherInfo);
+
+    mMachine->SetGuestProperty(Bstr(szPropNm).raw(),
+                               clientOtherInfo.raw(),
+                               bstrReadOnlyGuest.raw());
+
+}
+
 void Console::guestPropertiesVRDPUpdateClientAttach(uint32_t u32ClientId, bool fAttached)
 {
@@ -1203,4 +1260,16 @@
     {
         guestPropertiesVRDPUpdateNameChange(u32ClientId, pszStatus + strlen("NAME="));
+    }
+    else if (RTStrNICmp(pszStatus, "CIPA=", strlen("CIPA=")) == 0)
+    {
+        guestPropertiesVRDPUpdateIPAddrChange(u32ClientId, pszStatus + strlen("CIPA="));
+    }
+    else if (RTStrNICmp(pszStatus, "CLOCATION=", strlen("CLOCATION=")) == 0)
+    {
+        guestPropertiesVRDPUpdateLocationChange(u32ClientId, pszStatus + strlen("CLOCATION="));
+    }
+    else if (RTStrNICmp(pszStatus, "COINFO=", strlen("COINFO=")) == 0)
+    {
+        guestPropertiesVRDPUpdateOtherInfoChange(u32ClientId, pszStatus + strlen("COINFO="));
     }
 #endif
