Index: /trunk/src/VBox/Additions/common/VBoxService/Makefile.kmk
===================================================================
--- /trunk/src/VBox/Additions/common/VBoxService/Makefile.kmk	(revision 22727)
+++ /trunk/src/VBox/Additions/common/VBoxService/Makefile.kmk	(revision 22728)
@@ -35,5 +35,5 @@
 VBoxService_TEMPLATE      = VBOXGUESTR3EXE
 VBoxService_DEFS          = VBOXSERVICE_TIMESYNC
-VBoxService_DEFS.win     += _WIN32_WINNT=0x0501 _UNICODE UNICODE
+VBoxService_DEFS.win     += _WIN32_WINNT=0x0501
 VBoxService_DEFS.os2      = VBOX_WITH_HGCM VBOXSERVICE_CLIPBOARD
 ifdef VBOX_WITH_GUEST_PROPS
@@ -81,5 +81,5 @@
 VBoxServiceNT_TEMPLATE    = VBOXGUESTR3EXE
 VBoxServiceNT_EXTENDS     = VBoxService
-VBoxServiceNT_DEFS.win    = _WIN32_WINNT=0x0400 _UNICODE UNICODE TARGET_NT4
+VBoxServiceNT_DEFS.win    = _WIN32_WINNT=0x0400 TARGET_NT4
 
 #VBoxServiceVMInfo.cpp uses VBOX_SVN_REV.
Index: /trunk/src/VBox/Additions/common/VBoxService/VBoxService-win.cpp
===================================================================
--- /trunk/src/VBox/Additions/common/VBoxService/VBoxService-win.cpp	(revision 22727)
+++ /trunk/src/VBox/Additions/common/VBoxService/VBoxService-win.cpp	(revision 22728)
@@ -195,5 +195,5 @@
     {
         HKEY hKey = NULL;
-        if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, _T("SYSTEM\\CurrentControlSet\\Services\\EventLog\\System"), 0, KEY_ALL_ACCESS, &hKey) == ERROR_SUCCESS) {
+        if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SYSTEM\\CurrentControlSet\\Services\\EventLog\\System", 0, KEY_ALL_ACCESS, &hKey) == ERROR_SUCCESS) {
             RegDeleteKey(hKey, VBOXSERVICE_NAME);
             RegCloseKey(hKey);
Index: /trunk/src/VBox/Additions/common/VBoxService/VBoxServiceExec.cpp
===================================================================
--- /trunk/src/VBox/Additions/common/VBoxService/VBoxServiceExec.cpp	(revision 22727)
+++ /trunk/src/VBox/Additions/common/VBoxService/VBoxServiceExec.cpp	(revision 22728)
@@ -38,4 +38,7 @@
 #include "VBoxServiceInternal.h"
 #include "VBoxServiceUtils.h"
+#ifdef VBOX_WITH_GUEST_PROPS
+# include <VBox/HostServices/GuestPropertySvc.h>
+#endif
 
 
@@ -49,5 +52,6 @@
 /** The guest property service client ID. */
 static uint32_t         g_VMExecGuestPropSvcClientID = 0;
-
+/** The maximum of arguments a command can have. */
+#define EXEC_MAX_ARGS   32
 
 /** @copydoc VBOXSERVICE::pfnPreInit */
@@ -99,7 +103,31 @@
 
 
+/**
+ * Validates flags for executable guest properties.
+ *
+ * @returns boolean.
+ * @retval  true on success.
+ * @retval  false if not valid.
+ *
+ * @param   pszFlags     Pointer to flags to be checked.
+ */
+bool VBoxServiceExecValidateFlags(char* pszFlags)
+{
+    if (pszFlags == NULL)
+        return false;
+
+    if (   (NULL != RTStrStr(pszFlags, "TRANSIENT"))
+        && (NULL != RTStrStr(pszFlags, "RDONLYGUEST")))
+    {
+        return true;
+    }
+    return false;
+}
+
+
 /** @copydoc VBOXSERVICE::pfnWorker */
 DECLCALLBACK(int) VBoxServiceExecWorker(bool volatile *pfShutdown)
 {
+    using namespace guestProp;
     int rc = VINF_SUCCESS;
 
@@ -109,4 +137,5 @@
      */
     RTThreadUserSignal(RTThreadSelf());
+    Assert(g_VMExecGuestPropSvcClientID > 0);
 
     /*
@@ -119,5 +148,4 @@
     for (;;)
     {
-#ifndef TARGET_NT4 /** @todo r=bird: Add comment explaining why please. */
         /*
          * The thread at the moment does nothing but checking for one specific guest property
@@ -129,4 +157,6 @@
         if (!fSysprepDone)
         {
+            uint32_t cbBuf = MAX_VALUE_LEN + MAX_FLAGS_LEN + 1024;
+
             /* Get arguments. */
             /** @todo r=bird: How exactly does this work wrt. enabled/disabled?  In
@@ -136,18 +166,84 @@
              *        additions this will be executed everytime the system starts now - if
              *        I understand the code correctly. Is this intentional? */
-            char *pszArgs;
-            rc = VbglR3GuestPropReadValueAlloc(g_VMExecGuestPropSvcClientID, "/VirtualBox/HostGuest/SysprepArgs", &pszArgs);
-            if (RT_FAILURE(rc))
-                VBoxServiceVerbose(2, "Sysprep guest property not found or broken communication. Error: %Rrc\n", pszArgs, rc);
-
-            /** @todo r=bird: You must check that the flags, you should require it to the
-             *  TRANSIENT and RDONLYGUEST. Otherwise, we'll have a potential priviledge
-             *  escalation issue inside the guest if the variable is removed. */
-
-            static char *s_pszSysprepImage = "c:\\sysprep\\sysprep.exe";
-            if (    RT_SUCCESS(rc)
-                &&  !RTFileExists(s_pszSysprepImage))
-            {
-                VBoxServiceError("Sysprep executable not found! Search path=%s\n", s_pszSysprepImage);
+            void* pvSysprepCmd = RTMemAllocZ(cbBuf);
+            char* pszSysprepCmdValue = NULL;
+            uint64_t u64SysprepCmdTimestamp = 0;
+            char* pszSysprepCmdFlags = NULL;
+#ifdef SYSPREP_WITH_CMD
+            /* Get sysprep properties. */
+            if (RT_SUCCESS(rc))
+            {
+                rc = VbglR3GuestPropRead(g_VMExecGuestPropSvcClientID, "/VirtualBox/HostGuest/SysprepCmd",
+                                         pvSysprepCmd, cbBuf,
+                                         &pszSysprepCmdValue, &u64SysprepCmdTimestamp, &pszSysprepCmdFlags, NULL);
+                if (RT_FAILURE(rc))
+                {
+                    if (rc == VERR_NOT_FOUND)
+                        VBoxServiceVerbose(2, "Sysprep cmd guest property not found\n");
+                    else
+                        VBoxServiceError("Sysprep cmd guest property: Error = %Rrc\n", rc);
+                }
+                else
+                {
+                    !VBoxServiceExecValidateFlags(pszSysprepCmdFlags) ? rc = rc : rc = VERR_ACCESS_DENIED;
+                    if (RT_SUCCESS(rc))
+                    {
+                        if (RTStrNLen(pszSysprepCmdValue, _MAX_PATH) <= 0)
+                            rc = VERR_NOT_FOUND;
+                    }
+                    VBoxServiceVerbose(2, "Sysprep cmd guest property: %Rrc\n", rc);
+                }
+            }
+#else
+            /* Choose sysprep image based on OS version. */
+            char szSysprepCmd[_MAX_PATH] = "c:\\sysprep\\sysprep.exe";
+            OSVERSIONINFOEX OSInfoEx;
+            memset(&OSInfoEx, '\0', sizeof(OSInfoEx));
+            OSInfoEx.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
+            if (GetVersionEx((LPOSVERSIONINFO) &OSInfoEx))
+            {
+                if (OSInfoEx.dwMajorVersion >= 6) /* Use built-in sysprep on Vista or later. */
+                    RTStrPrintf(szSysprepCmd, sizeof(szSysprepCmd), "%s\\system32\\sysprep\\sysprep.exe", RTEnvGet("windir"));
+            }
+            pszSysprepCmdValue = szSysprepCmd;
+#endif
+            void* pvSysprepArgs = RTMemAllocZ(cbBuf);
+            char* pszSysprepArgsValue = NULL;
+            uint64_t u64SysprepArgsTimestamp = 0;
+            char* pszSysprepArgsFlags = NULL;
+
+            if (RT_SUCCESS(rc))
+            {
+                pvSysprepArgs = RTMemAllocZ(cbBuf);
+                char szVal[] = "/VirtualBox/HostGuest/SysprepArgs";
+                char *pTmp = NULL;
+                rc = RTStrCurrentCPToUtf8(&pTmp, szVal);
+                rc = VbglR3GuestPropRead(g_VMExecGuestPropSvcClientID, pTmp,
+                                         pvSysprepArgs, cbBuf,
+                                         &pszSysprepArgsValue, &u64SysprepArgsTimestamp, &pszSysprepArgsFlags, NULL);
+                RTStrFree(pTmp);
+                if (RT_FAILURE(rc))
+                {
+                    if (rc == VERR_NOT_FOUND)
+                        VBoxServiceVerbose(2, "Sysprep argument guest property not found\n");
+                    else
+                        VBoxServiceError("Sysprep argument guest property: Error = %Rrc\n", rc);
+                }
+                else
+                {
+                    !VBoxServiceExecValidateFlags(pszSysprepArgsFlags) ? rc = rc : rc = VERR_ACCESS_DENIED;
+                    if (RT_SUCCESS(rc))
+                    {
+                        if (RTStrNLen(pszSysprepArgsValue, EXEC_MAX_ARGS) <= 0)
+                            rc = VERR_NOT_FOUND;
+                    }
+                    VBoxServiceVerbose(2, "Sysprep argument guest property: %Rrc\n", rc);
+                }
+            }
+
+            if (   RT_SUCCESS(rc)
+                && !RTFileExists(pszSysprepCmdValue))
+            {
+                VBoxServiceError("Sysprep executable not found! Search path=%s\n", pszSysprepCmdValue);
                 rc = VERR_FILE_NOT_FOUND;
             }
@@ -155,10 +251,35 @@
             if (RT_SUCCESS(rc))
             {
-                RTPROCESS   pid;
-                const char *papszArgs[6] = { s_pszSysprepImage, "-quiet", "-reseal", "-mini", "-activated", NULL};
-
-                /** @todo append the arguments in SysprepArgs/pszArgs.  */
+                RTPROCESS pid;
+
+                /* Construct arguments list. */
+                /** @todo would be handy to have such a function in IPRT. */
+                int16_t index = 0;
+                char* pszArg = pszSysprepArgsValue;
+
+                const char* pArgs[EXEC_MAX_ARGS]; /* Do we have a #define in IPRT for max args? */
+
+                VBoxServiceVerbose(3, "Sysprep argument value: %s\n", pszSysprepArgsValue);
+                pArgs[index++] = pszSysprepCmdValue; /* Store image name as first argument. */
+                while (   (pszArg != NULL)
+                       && (*pszArg != NULL))
+                {
+                    char* pCurArg = (char*)RTMemAllocZ(_MAX_PATH);
+                    int arg = 0;
+                    while (   (*pszArg != ' ')
+                           && (*pszArg != NULL))
+                    {
+                        pCurArg[arg++] = *pszArg;
+                        pszArg++;
+                    }
+                    pszArg++; /* Skip leading space. */
+                    VBoxServiceVerbose(3, "Sysprep argument %d = %s\n", index, pCurArg);
+                    pArgs[index++] = pCurArg;
+                }
+                pArgs[index] = NULL;
+
+                /* Execute ... */
                 VBoxServiceVerbose(3, "Executing sysprep ...\n");
-                rc = RTProcCreate(papszArgs[0], papszArgs, RTENV_DEFAULT, 0, &pid);
+                rc = RTProcCreate(pszSysprepCmdValue, pArgs, RTENV_DEFAULT, 0, &pid);
                 if (RT_SUCCESS(rc))
                 {
@@ -172,19 +293,19 @@
                             &&  Status.enmReason == RTPROCEXITREASON_NORMAL)
                         {
-                            rc = VINF_SUCCESS;
-                            fSysprepDone = true; /** r=bird: So, if sysprep fails, the idea is to continue executing the code every 10 seconds? */
+                            fSysprepDone = true; /* We're done, no need to repeat the sysprep exec. */
                         }
                     }
 
                     /* Set return value so the host knows what happend. */
-                    rc = VbglR3GuestPropWriteValueF(g_VMExecGuestPropSvcClientID, "/VirtualBox/HostGuest/SysprepRet", "%d", Status.iStatus);
+                    rc = VboxServiceWritePropInt(g_VMExecGuestPropSvcClientID, "HostGuest/SysprepRet", Status.iStatus);
                     if (RT_FAILURE(rc))
                         VBoxServiceError("Failed to write SysprepRet: rc=%Rrc\n", rc);
                 }
-            }
-
-            VbglR3GuestPropReadValueFree(pszArgs);
+
+                /* Destroy argument list (all but the first and last arg, it's just a pointer). */
+                for (int i=1; i<index-1; i++)
+                    RTMemFree((void*)pArgs[i]);
+            }
         }
-#endif /* !TARGET_NT4 */
 
 #ifdef FULL_FEATURED_EXEC
@@ -244,11 +365,9 @@
 {
     /* Nothing here yet. */
-    /** @todo r=bird: Shouldn't you do the following here:
-     *        VbglR3GuestPropDisconnect(g_VMExecGuestPropSvcClientID);
-     *        g_VMExecGuestPropSvcClientID = 0;
-     * And quite possibly:
-     *        RTSemEventMultiDestroy(g_hVMExecEvent);
-     *        g_hVMExecEvent = NIL_RTSEMEVENTMULTI;
-     */
+    VbglR3GuestPropDisconnect(g_VMExecGuestPropSvcClientID);
+    g_VMExecGuestPropSvcClientID = 0;
+
+    RTSemEventMultiDestroy(g_VMExecEvent);
+    g_VMExecEvent = NIL_RTSEMEVENTMULTI;
 }
 
Index: /trunk/src/VBox/Additions/common/VBoxService/VBoxServiceInternal.h
===================================================================
--- /trunk/src/VBox/Additions/common/VBoxService/VBoxServiceInternal.h	(revision 22727)
+++ /trunk/src/VBox/Additions/common/VBoxService/VBoxServiceInternal.h	(revision 22728)
@@ -26,6 +26,5 @@
 #ifdef RT_OS_WINDOWS
 # include <Windows.h>
-# include <tchar.h>   /**@todo just drop this, this will be compiled as UTF-8/ANSI. */
-# include <process.h> /**@todo what's this here for?  */
+# include <process.h> /* Needed for file version information. */
 #endif
 
@@ -96,7 +95,7 @@
 #ifdef RT_OS_WINDOWS
 /** The service name (needed for mutex creation on Windows). */
-#define VBOXSERVICE_NAME           L"VBoxService"
+#define VBOXSERVICE_NAME          "VBoxService"
 /** The friendly service name. */
-#define VBOXSERVICE_FRIENDLY_NAME  L"VBoxService"
+#define VBOXSERVICE_FRIENDLY_NAME "VBoxService"
 /** The following constant may be defined by including NtStatus.h. */
 #define STATUS_SUCCESS ((NTSTATUS)0x00000000L)
@@ -104,13 +103,13 @@
 typedef struct
 {
-    TCHAR szUser [_MAX_PATH];
-    TCHAR szAuthenticationPackage [_MAX_PATH];
-    TCHAR szLogonDomain [_MAX_PATH];
+    WCHAR szUser [_MAX_PATH];
+    WCHAR szAuthenticationPackage [_MAX_PATH];
+    WCHAR szLogonDomain [_MAX_PATH];
 } VBOXSERVICEVMINFOUSER, *PVBOXSERVICEVMINFOUSER;
 /** Structure for the file information lookup. */
 typedef struct
 {
-    TCHAR* pszFilePath;
-    TCHAR* pszFileName;
+    char* pszFilePath;
+    char* pszFileName;
 } VBOXSERVICEVMINFOFILE, *PVBOXSERVICEVMINFOFILE;
 /** Function prototypes for dynamic loading. */
Index: /trunk/src/VBox/Additions/common/VBoxService/VBoxServiceUtils.cpp
===================================================================
--- /trunk/src/VBox/Additions/common/VBoxService/VBoxServiceUtils.cpp	(revision 22727)
+++ /trunk/src/VBox/Additions/common/VBoxService/VBoxServiceUtils.cpp	(revision 22728)
@@ -90,13 +90,12 @@
 
 #ifdef RT_OS_WINDOWS
-/** @todo Use TCHAR here instead of LPC*STR crap. */
-BOOL VboxServiceGetFileString(LPCWSTR pszFileName,
-                              LPWSTR pszBlock,
-                              LPWSTR pszString,
+BOOL VboxServiceGetFileString(const char* pszFileName,
+                              char* pszBlock,
+                              char* pszString,
                               PUINT puiSize)
 {
     DWORD dwHandle, dwLen = 0;
     UINT uiDataLen = 0;
-    LPTSTR lpData = NULL;
+    char* lpData = NULL;
     UINT uiValueLen = 0;
     LPTSTR lpValue = NULL;
@@ -115,5 +114,5 @@
     if (!dwLen)
     {
-        VBoxServiceError("No file information found! File = %ls, Error: %ld\n", pszFileName, GetLastError());
+        VBoxServiceError("No file information found! File = %s, Error: %ld\n", pszFileName, GetLastError());
         return FALSE;
     }
@@ -130,5 +129,5 @@
         if((bRet = VerQueryValue(lpData, pszBlock, (LPVOID*)&lpValue, (PUINT)&uiValueLen)))
         {
-            UINT uiSize = uiValueLen * sizeof(TCHAR);
+            UINT uiSize = uiValueLen * sizeof(char);
 
             if(uiSize > *puiSize)
@@ -147,5 +146,5 @@
 
 
-BOOL VboxServiceGetFileVersion(LPCWSTR pszFileName,
+BOOL VboxServiceGetFileVersion(const char* pszFileName,
                                DWORD* pdwMajor,
                                DWORD* pdwMinor,
@@ -170,15 +169,13 @@
 
     /* Try own fields defined in block "\\StringFileInfo\\040904b0\\FileVersion". */
-    TCHAR szValueUTF16[_MAX_PATH] = {0};
-    char szValueUTF8[_MAX_PATH] = {0};
-    char *pszValueUTF8  = szValueUTF8;
+    char szValue[_MAX_PATH] = {0};
+    char *pszValue  = szValue;
     UINT uiSize = _MAX_PATH;
     int r = 0;
 
-    bRet = VboxServiceGetFileString(pszFileName, TEXT("\\StringFileInfo\\040904b0\\FileVersion"), szValueUTF16, &uiSize);
+    bRet = VboxServiceGetFileString(pszFileName, "\\StringFileInfo\\040904b0\\FileVersion", szValue, &uiSize);
     if (bRet)
     {
-        r = RTUtf16ToUtf8Ex(szValueUTF16, uiSize, &pszValueUTF8, _MAX_PATH, NULL);
-        sscanf(szValueUTF8, "%ld.%ld.%ld.%ld", pdwMajor, pdwMinor, pdwBuildNumber, pdwRevisionNumber);
+        sscanf(pszValue, "%ld.%ld.%ld.%ld", pdwMajor, pdwMinor, pdwBuildNumber, pdwRevisionNumber);
     }
     else if (dwLen > 0)
@@ -194,5 +191,5 @@
         if (GetFileVersionInfo(pszFileName, dwHandle, dwLen, lpData))
         {
-            if((bRet = VerQueryValue(lpData, TEXT("\\"), (LPVOID*)&pFileInfo, (PUINT)&BufLen)))
+            if((bRet = VerQueryValue(lpData, "\\", (LPVOID*)&pFileInfo, (PUINT)&BufLen)))
             {
                 *pdwMajor = HIWORD(pFileInfo->dwFileVersionMS);
@@ -211,13 +208,12 @@
 
 
-BOOL VboxServiceGetFileVersionString(LPCWSTR pszPath, LPCWSTR pszFileName, char* pszVersion, UINT uiSize)
+BOOL VboxServiceGetFileVersionString(const char* pszPath, const char* pszFileName, char* pszVersion, UINT uiSize)
 {
     BOOL bRet = FALSE;
-    TCHAR szFullPath[_MAX_PATH] = {0};
-    TCHAR szValueUTF16[_MAX_PATH] = {0};
-    char szValueUTF8[_MAX_PATH] = {0};
+    char szFullPath[_MAX_PATH] = {0};
+    char szValue[_MAX_PATH] = {0};
     int r = 0;
 
-    swprintf(szFullPath, 4096, TEXT("%s\\%s"), pszPath, pszFileName); /** @todo here as well. */
+    RTStrPrintf(szFullPath, 4096, "%s\\%s", pszPath, pszFileName);
 
     DWORD dwMajor, dwMinor, dwBuild, dwRev;
Index: /trunk/src/VBox/Additions/common/VBoxService/VBoxServiceUtils.h
===================================================================
--- /trunk/src/VBox/Additions/common/VBoxService/VBoxServiceUtils.h	(revision 22727)
+++ /trunk/src/VBox/Additions/common/VBoxService/VBoxServiceUtils.h	(revision 22728)
@@ -31,5 +31,5 @@
 #ifdef RT_OS_WINDOWS
 /** Gets a pre-formatted version string from the VS_FIXEDFILEINFO table. */
-BOOL VboxServiceGetFileVersionString(LPCWSTR pszPath, LPCWSTR pszFileName, char* pszVersion, UINT uiSize);
+BOOL VboxServiceGetFileVersionString(const char* pszPath, const char* pszFileName, char* pszVersion, UINT uiSize);
 #endif
 
Index: /trunk/src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo-win.cpp
===================================================================
--- /trunk/src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo-win.cpp	(revision 22727)
+++ /trunk/src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo-win.cpp	(revision 22728)
@@ -272,5 +272,5 @@
                 if (SidTypeUser == ownerType)
                 {
-                    LPWSTR pBuffer = NULL;
+                    char* pBuffer = NULL;
                     DWORD dwBytesRet = 0;
                     int iState = 0;
@@ -411,14 +411,14 @@
     char szVer[_MAX_PATH] = {0};
     char szPropPath[_MAX_PATH] = {0};
-    TCHAR szSysDir[_MAX_PATH] = {0};
-    TCHAR szWinDir[_MAX_PATH] = {0};
-    TCHAR szDriversDir[_MAX_PATH + 32] = {0};
+    char szSysDir[_MAX_PATH] = {0};
+    char szWinDir[_MAX_PATH] = {0};
+    char szDriversDir[_MAX_PATH + 32] = {0};
 
     GetSystemDirectory(szSysDir, _MAX_PATH);
     GetWindowsDirectory(szWinDir, _MAX_PATH);
-    swprintf(szDriversDir, (_MAX_PATH + 32), TEXT("%s\\drivers"), szSysDir);
+    RTStrPrintf(szDriversDir, (_MAX_PATH + 32), "%s\\drivers", szSysDir);
 #ifdef RT_ARCH_AMD64
-    TCHAR szSysWowDir[_MAX_PATH + 32] = {0};
-    swprintf(szSysWowDir, (_MAX_PATH + 32), TEXT("%s\\SysWow64"), szWinDir);
+    char szSysWowDir[_MAX_PATH + 32] = {0};
+    RTStrPrintf(szSysWowDir, (_MAX_PATH + 32), "%s\\SysWow64", szWinDir);
 #endif
 
@@ -427,36 +427,36 @@
     VBOXSERVICEVMINFOFILE vboxFileInfoTable[] =
     {
-        { szSysDir, TEXT("VBoxControl.exe"), },
-        { szSysDir, TEXT("VBoxHook.dll"), },
-        { szSysDir, TEXT("VBoxDisp.dll"), },
-        { szSysDir, TEXT("VBoxMRXNP.dll"), },
-        { szSysDir, TEXT("VBoxService.exe"), },
-        { szSysDir, TEXT("VBoxTray.exe"), },
-        { szSysDir, TEXT("VBoxGINA.dll"), },
+        { szSysDir, "VBoxControl.exe", },
+        { szSysDir, "VBoxHook.dll", },
+        { szSysDir, "VBoxDisp.dll", },
+        { szSysDir, "VBoxMRXNP.dll", },
+        { szSysDir, "VBoxService.exe", },
+        { szSysDir, "VBoxTray.exe", },
+        { szSysDir, "VBoxGINA.dll", },
 
  /* On 64-bit we don't yet have the OpenGL DLLs in native format.
     So just enumerate the 32-bit files in the SYSWOW directory. */
  #ifdef RT_ARCH_AMD64
-        { szSysWowDir, TEXT("VBoxOGLarrayspu.dll"), },
-        { szSysWowDir, TEXT("VBoxOGLcrutil.dll"), },
-        { szSysWowDir, TEXT("VBoxOGLerrorspu.dll"), },
-        { szSysWowDir, TEXT("VBoxOGLpackspu.dll"), },
-        { szSysWowDir, TEXT("VBoxOGLpassthroughspu.dll"), },
-        { szSysWowDir, TEXT("VBoxOGLfeedbackspu.dll"), },
-        { szSysWowDir, TEXT("VBoxOGL.dll"), },
+        { szSysWowDir, "VBoxOGLarrayspu.dll", },
+        { szSysWowDir, "VBoxOGLcrutil.dll", },
+        { szSysWowDir, "VBoxOGLerrorspu.dll", },
+        { szSysWowDir, "VBoxOGLpackspu.dll", },
+        { szSysWowDir, "VBoxOGLpassthroughspu.dll", },
+        { szSysWowDir, "VBoxOGLfeedbackspu.dll", },
+        { szSysWowDir, "VBoxOGL.dll", },
  #else
-        { szSysDir, TEXT("VBoxOGLarrayspu.dll"), },
-        { szSysDir, TEXT("VBoxOGLcrutil.dll"), },
-        { szSysDir, TEXT("VBoxOGLerrorspu.dll"), },
-        { szSysDir, TEXT("VBoxOGLpackspu.dll"), },
-        { szSysDir, TEXT("VBoxOGLpassthroughspu.dll"), },
-        { szSysDir, TEXT("VBoxOGLfeedbackspu.dll"), },
-        { szSysDir, TEXT("VBoxOGL.dll"), },  
+        { szSysDir, "VBoxOGLarrayspu.dll", },
+        { szSysDir, "VBoxOGLcrutil.dll", },
+        { szSysDir, "VBoxOGLerrorspu.dll", },
+        { szSysDir, "VBoxOGLpackspu.dll", },
+        { szSysDir, "VBoxOGLpassthroughspu.dll", },
+        { szSysDir, "VBoxOGLfeedbackspu.dll", },
+        { szSysDir, "VBoxOGL.dll", },
  #endif
 
-        { szDriversDir, TEXT("VBoxGuest.sys"), },
-        { szDriversDir, TEXT("VBoxMouse.sys"), },
-        { szDriversDir, TEXT("VBoxSF.sys"),    },
-        { szDriversDir, TEXT("VBoxVideo.sys"), },
+        { szDriversDir, "VBoxGuest.sys", },
+        { szDriversDir, "VBoxMouse.sys", },
+        { szDriversDir, "VBoxSF.sys",    },
+        { szDriversDir, "VBoxVideo.sys", },
 
         {
@@ -467,13 +467,13 @@
     VBOXSERVICEVMINFOFILE vboxFileInfoTable[] =
     {
-        { szSysDir, TEXT("VBoxControl.exe"), },
-        { szSysDir, TEXT("VBoxHook.dll"), },
-        { szSysDir, TEXT("VBoxDisp.dll"), },
-        { szSysDir, TEXT("VBoxService.exe"), },
-        { szSysDir, TEXT("VBoxTray.exe"), },
-
-        { szDriversDir, TEXT("VBoxGuestNT.sys"), },
-        { szDriversDir, TEXT("VBoxMouseNT.sys"), },
-        { szDriversDir, TEXT("VBoxVideo.sys"), },
+        { szSysDir, "VBoxControl.exe", },
+        { szSysDir, "VBoxHook.dll", },
+        { szSysDir, "VBoxDisp.dll", },
+        { szSysDir, "VBoxService.exe", },
+        { szSysDir, "VBoxTray.exe", },
+
+        { szDriversDir, "VBoxGuestNT.sys", },
+        { szDriversDir, "VBoxMouseNT.sys", },
+        { szDriversDir, "VBoxVideo.sys", },
 
         {
@@ -488,5 +488,5 @@
     {
         rc = VboxServiceGetFileVersionString(pTable->pszFilePath, pTable->pszFileName, szVer, sizeof(szVer));
-        RTStrPrintf(szPropPath, sizeof(szPropPath), "GuestAdd/Components/%ls", pTable->pszFileName);
+        RTStrPrintf(szPropPath, sizeof(szPropPath), "GuestAdd/Components/%s", pTable->pszFileName);
         VboxServiceWriteProp(uiClientID, szPropPath, szVer);
         pTable++;
Index: /trunk/src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp
===================================================================
--- /trunk/src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp	(revision 22727)
+++ /trunk/src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp	(revision 22728)
@@ -115,5 +115,5 @@
 #ifdef RT_OS_WINDOWS
     /* Get function pointers. */
-    HMODULE hKernel32 = LoadLibrary(_T("kernel32"));
+    HMODULE hKernel32 = LoadLibrary("kernel32");
     if (NULL != hKernel32)
     {
