Index: /trunk/src/VBox/Additions/WINNT/Installer/VBoxDrvInst.cpp
===================================================================
--- /trunk/src/VBox/Additions/WINNT/Installer/VBoxDrvInst.cpp	(revision 35833)
+++ /trunk/src/VBox/Additions/WINNT/Installer/VBoxDrvInst.cpp	(revision 35834)
@@ -143,10 +143,10 @@
                       const _TCHAR *pszLogFile)
 {
-    HRESULT hr = ERROR_SUCCESS;
+    HRESULT hr = S_OK;
     HMODULE hDIFxAPI = LoadLibrary(_T("DIFxAPI.dll"));
     if (NULL == hDIFxAPI)
     {
         _tprintf(_T("ERROR: Unable to locate DIFxAPI.dll!\n"));
-        hr = ERROR_FILE_NOT_FOUND;
+        hr = HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND);
     }
     else
@@ -158,5 +158,5 @@
             {
                 _tprintf(_T("ERROR: Unable to retrieve entry point for DriverPackageInstallW!\n"));
-                hr = ERROR_PROC_NOT_FOUND;
+                hr = HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
             }
         }
@@ -167,5 +167,5 @@
             {
                 _tprintf(_T("ERROR: Unable to retrieve entry point for DriverPackageUninstallW!\n"));
-                hr = ERROR_PROC_NOT_FOUND;
+                hr = HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
             }
         }
@@ -177,5 +177,5 @@
             {
                 _tprintf(_T("ERROR: Unable to retrieve entry point for DIFXAPISetLogCallbackW!\n"));
-                hr = ERROR_PROC_NOT_FOUND;
+                hr = HRESULT_FROM_WIN32(ERROR_PROC_NOT_FOUND);
             }
         }
@@ -184,11 +184,11 @@
     if (SUCCEEDED(hr))
     {
-        FILE *fh = NULL;
+        FILE *phFile = NULL;
         if (pszLogFile)
         {
-            fh = _wfopen(pszLogFile, _T("a"));
-            if (!fh)
+            phFile = _wfopen(pszLogFile, _T("a"));
+            if (!phFile)
                 _tprintf(_T("ERROR: Unable to create log file!\n"));
-            g_pfnDIFXAPISetLogCallback(LogCallback, fh);
+            g_pfnDIFXAPISetLogCallback(LogCallback, phFile);
         }
 
@@ -205,5 +205,5 @@
         {
             _tprintf(_T("ERROR: INF-Path too long / could not be retrieved!\n"));
-            hr = ERROR_INVALID_PARAMETER;
+            hr = HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER);
         }
         else
@@ -301,7 +301,7 @@
                         break;
 
-                case ERROR_SHARING_VIOLATION:
-                    _tprintf(_T("ERROR: A component of the driver package in the DIFx driver store is locked by a thread or process\n"));
-                    break;
+                    case ERROR_SHARING_VIOLATION:
+                        _tprintf(_T("ERROR: A component of the driver package in the DIFx driver store is locked by a thread or process\n"));
+                        break;
 
                     /*
@@ -315,7 +315,7 @@
                         break;
 
-                case ERROR_UNSUPPORTED_TYPE:
-                    _tprintf(_T("ERROR: The driver package type is not supported of INF %ws!\n"), szDriverInf);
-                    break;
+                    case ERROR_UNSUPPORTED_TYPE:
+                        _tprintf(_T("ERROR: The driver package type is not supported of INF %ws!\n"), szDriverInf);
+                        break;
 
                     default:
@@ -328,11 +328,12 @@
                     }
                 }
-                hr = ERROR_INSTALL_FAILURE;
+                hr = HRESULT_FROM_WIN32(dwRet);
             }
             g_pfnDIFXAPISetLogCallback(NULL, NULL);
-            if (fh)
-                fclose(fh);
+            if (phFile)
+                fclose(phFile);
             if (SUCCEEDED(hr))
             {
+                _tprintf(_T("Driver was installed successfully!\n"));
                 if (fReboot)
                     _tprintf(_T("A reboot is needed to complete the driver (un)installation!\n"));
