Changeset 106321 in vbox
- Timestamp:
- Oct 15, 2024 1:06:30 PM (6 weeks ago)
- Location:
- trunk
- Files:
-
- 6 added
- 29 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/err.h
r106061 r106321 3299 3299 /** @} */ 3300 3300 3301 /** A reboot is needed for completing driver (un)installation. */ 3302 #define VERR_DRIVER_REBOOT_NEEDED (-1028) 3303 /** A reboot is needed for completing driver (un)installation. */ 3304 #define VINF_DRIVER_REBOOT_NEEDED (1028) 3301 3305 /* SED-END */ 3302 3306 -
trunk/include/iprt/err.h
r106061 r106321 408 408 /** Floating pointer overflow. */ 409 409 #define VWRN_FLOAT_OVERFLOW (22427) 410 /** A reboot is needed. */ 411 #define VERR_REBOOT_NEEDED (-22428) 412 /** A reboot is needed. */ 413 #define VINF_REBOOT_NEEDED (22428) 414 /** Installation has failed. */ 415 #define VERR_INSTALLATION_FAILED (-22429) 410 416 /** @} */ 411 417 -
trunk/src/VBox/Additions/WINNT/Installer/Makefile.kmk
r106247 r106321 62 62 endif 63 63 VBoxDrvInst_DEPS = $(VBOX_SVN_REV_KMK) 64 VBoxDrvInst_SDKS = ReorderCompilerIncs $(VBOX_WINPSDK_GST) $(VBOX_WINDDK_GST) VBoxWinNewDevLib64 VBoxDrvInst_SDKS = ReorderCompilerIncs $(VBOX_WINPSDK_GST) $(VBOX_WINDDK_GST) 65 65 VBoxDrvInst_INCS = ../include 66 VBoxDrvInst_LIBS = \67 $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/setupapi.lib68 66 VBoxDrvInst_SOURCES = \ 69 67 VBoxDrvInst.cpp \ 70 VBoxDrvInst.rc 68 VBoxDrvInst.rc \ 69 $(PATH_ROOT)/src/VBox/GuestHost/Installation/VBoxWinDrvCommon.cpp \ 70 $(PATH_ROOT)/src/VBox/GuestHost/Installation/VBoxWinDrvInst.cpp \ 71 $(PATH_ROOT)/src/VBox/GuestHost/Installation/VBoxWinDrvStore.cpp 71 72 VBoxDrvInst_VBOX_IMPORT_CHECKER.win.x86 := nt4 # setupapi was introduced in NT4 72 73 … … 263 264 -E 'PATH_OUT=$(subst /,\,$(PATH_OUT))' \ 264 265 -E 'PATH_TARGET=$(subst /,\,$(PATH_TARGET))' \ 265 -E 'VBOX_PATH_DIFX=$(subst /,\,$(VBOX_PATH_DIFX))' \266 266 -E 'VBOX_VENDOR=$(VBOX_VENDOR)' \ 267 267 -E 'VBOX_VENDOR_SHORT=$(VBOX_VENDOR_SHORT)' \ -
trunk/src/VBox/Additions/WINNT/Installer/VBoxDrvInst.cpp
r106061 r106321 39 39 #include <iprt/win/windows.h> 40 40 #include <iprt/win/setupapi.h> 41 #include <newdev.h> /* For INSTALLFLAG_XXX. */ 42 #include <cfgmgr32.h> /* For MAX_DEVICE_ID_LEN. */ 41 43 #include <devguid.h> 42 44 #include <RegStr.h> … … 47 49 48 50 #include <iprt/asm.h> 51 #include <iprt/err.h> 52 #include <iprt/initterm.h> 53 #include <iprt/ldr.h> 49 54 #include <iprt/mem.h> 55 #include <iprt/message.h> 56 #include <iprt/once.h> 50 57 #include <iprt/path.h> /* RTPATH_IS_SEP */ 58 #include <iprt/stream.h> 51 59 #include <iprt/string.h> 60 #include <iprt/system.h> 52 61 #include <iprt/utf16.h> 62 63 #include <VBox/GuestHost/VBoxWinDrvInst.h> 53 64 54 65 /* Exit codes */ … … 65 76 * Defines * 66 77 *********************************************************************************************************************************/ 67 /* Defines */68 #define DRIVER_PACKAGE_REPAIR 0x0000000169 #define DRIVER_PACKAGE_SILENT 0x0000000270 #define DRIVER_PACKAGE_FORCE 0x0000000471 #define DRIVER_PACKAGE_ONLY_IF_DEVICE_PRESENT 0x0000000872 #define DRIVER_PACKAGE_LEGACY_MODE 0x0000001073 #define DRIVER_PACKAGE_DELETE_FILES 0x0000002074 75 /* DIFx error codes */76 /** @todo any reason why we're not using difxapi.h instead of these redefinitions? */77 #ifndef ERROR_DRIVER_STORE_ADD_FAILED78 # define ERROR_DRIVER_STORE_ADD_FAILED (APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x0247L)79 #endif80 #define ERROR_DEPENDENT_APPLICATIONS_EXIST (APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x300)81 #define ERROR_DRIVER_PACKAGE_NOT_IN_STORE (APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x302)82 83 78 /* Registry string list flags */ 84 79 #define VBOX_REG_STRINGLIST_NONE 0x00000000 /**< No flags set. */ 85 80 #define VBOX_REG_STRINGLIST_ALLOW_DUPLICATES 0x00000001 /**< Allows duplicates in list when adding a value. */ 86 87 #ifdef DEBUG88 # define VBOX_DRVINST_LOGFILE "C:\\Temp\\VBoxDrvInstDIFx.log"89 #endif90 81 91 82 /** NT4: The video service name. */ … … 96 87 97 88 /********************************************************************************************************************************* 98 * Structures and Typedefs *99 *********************************************************************************************************************************/100 typedef struct101 {102 PCWSTR pApplicationId;103 PCWSTR pDisplayName;104 PCWSTR pProductName;105 PCWSTR pMfgName;106 } INSTALLERINFO, *PINSTALLERINFO;107 typedef const PINSTALLERINFO PCINSTALLERINFO;108 109 typedef enum110 {111 DIFXAPI_SUCCESS,112 DIFXAPI_INFO,113 DIFXAPI_WARNING,114 DIFXAPI_ERROR115 } DIFXAPI_LOG;116 117 typedef void (__cdecl *DIFXAPILOGCALLBACK_W)(DIFXAPI_LOG Event, DWORD Error, PCWSTR EventDescription, PVOID CallbackContext);118 typedef DWORD (WINAPI *PFN_DriverPackageInstall_T)(PCTSTR DriverPackageInfPath, DWORD Flags, PCINSTALLERINFO pInstallerInfo, BOOL *pNeedReboot);119 typedef DWORD (WINAPI *PFN_DriverPackageUninstall_T)(PCTSTR DriverPackageInfPath, DWORD Flags, PCINSTALLERINFO pInstallerInfo, BOOL *pNeedReboot);120 typedef VOID (WINAPI *PFN_DIFXAPISetLogCallback_T)(DIFXAPILOGCALLBACK_W LogCallback, PVOID CallbackContext);121 122 123 /*********************************************************************************************************************************124 89 * Global Variables * 125 90 *********************************************************************************************************************************/ 126 static PFN_DriverPackageInstall_T g_pfnDriverPackageInstall = NULL;127 static PFN_DriverPackageUninstall_T g_pfnDriverPackageUninstall = NULL;128 static PFN_DIFXAPISetLogCallback_T g_pfnDIFXAPISetLogCallback = NULL;129 130 131 132 91 static char *ArgToUtf8(wchar_t const *pwszString, const char *pszArgName) 133 92 { … … 198 157 } 199 158 200 201 /**202 * Log callback for DIFxAPI calls.203 *204 * @param enmEvent Event logging level.205 * @param dwError Event error number.206 * @param pwszEventDesc Event description text.207 * @param pvCtx Log file handle, if we've got one.208 */209 static void __cdecl VBoxDIFxLogCallback(DIFXAPI_LOG enmEvent, DWORD dwError, PCWSTR pwszEventDesc, PVOID pvCtx)210 {211 const char *pszEvent;212 switch (enmEvent)213 {214 case DIFXAPI_SUCCESS: pszEvent = "DIFXAPI_SUCCESS"; break;215 case DIFXAPI_INFO: pszEvent = "DIFXAPI_INFO"; break;216 case DIFXAPI_WARNING: pszEvent = "DIFXAPI_WARNING"; break;217 case DIFXAPI_ERROR: pszEvent = "DIFXAPI_ERROR"; break;218 default: pszEvent = "DIFXAPI_<unknown>"; break;219 }220 221 /*222 * Log to standard output:223 */224 PrintStr(pszEvent);225 if (dwError == 0)226 PrintStr(": ");227 else228 {229 PrintStr(": ERROR: ");230 PrintX64(dwError);231 PrintStr(" - ");232 }233 PrintWStr(pwszEventDesc);234 PrintStr("\r\n");235 236 /*237 * Write to the log file if we have one - have to convert the input to UTF-8.238 */239 HANDLE const hLogFile = (HANDLE)pvCtx;240 if (hLogFile != INVALID_HANDLE_VALUE)241 {242 /* "event: err - desc\r\n" */243 char szBuf[256];244 RTStrCopy(szBuf, sizeof(szBuf), pszEvent);245 RTStrCat(szBuf, sizeof(szBuf), ": ");246 size_t offVal = strlen(szBuf);247 RTStrFormatU32(&szBuf[offVal], sizeof(szBuf) - offVal, dwError, 16, 0, 0, dwError ? RTSTR_F_SPECIAL : 0);248 RTStrCat(szBuf, sizeof(szBuf), " - ");249 DWORD dwIgn;250 WriteFile(hLogFile, szBuf, (DWORD)strlen(szBuf), &dwIgn, NULL);251 252 char *pszUtf8 = NULL;253 int vrc = RTUtf16ToUtf8(pwszEventDesc, &pszUtf8);254 if (RT_SUCCESS(vrc))255 {256 WriteFile(hLogFile, pszUtf8, (DWORD)strlen(pszUtf8), &dwIgn, NULL);257 RTStrFree(pszUtf8);258 WriteFile(hLogFile, RT_STR_TUPLE("\r\n"), &dwIgn, NULL);259 }260 else261 WriteFile(hLogFile, RT_STR_TUPLE("<RTUtf16ToUtf8 failed>\r\n"), &dwIgn, NULL);262 }263 }264 265 266 /**267 * Writes a header to the DIFx log file.268 */269 static void VBoxDIFxWriteLogHeader(HANDLE hLogFile, char const *pszOperation, wchar_t const *pwszInfFile)270 {271 /* Don't want to use RTStrPrintf here as it drags in a lot of code, thus this tedium... */272 char szBuf[256];273 size_t offBuf = 2;274 RTStrCopy(szBuf, sizeof(szBuf), "\r\n");275 276 SYSTEMTIME SysTime = {0};277 GetSystemTime(&SysTime);278 279 RTStrFormatU32(&szBuf[offBuf], sizeof(szBuf) - offBuf, SysTime.wYear, 10, 4, 0, RTSTR_F_ZEROPAD | RTSTR_F_WIDTH);280 offBuf += strlen(&szBuf[offBuf]);281 szBuf[offBuf++] = '-';282 283 RTStrFormatU32(&szBuf[offBuf], sizeof(szBuf) - offBuf, SysTime.wMonth, 10, 2, 0, RTSTR_F_ZEROPAD | RTSTR_F_WIDTH);284 offBuf += strlen(&szBuf[offBuf]);285 szBuf[offBuf++] = '-';286 287 RTStrFormatU32(&szBuf[offBuf], sizeof(szBuf) - offBuf, SysTime.wDay, 10, 2, 0, RTSTR_F_ZEROPAD | RTSTR_F_WIDTH);288 offBuf += strlen(&szBuf[offBuf]);289 szBuf[offBuf++] = 'T';290 291 RTStrFormatU32(&szBuf[offBuf], sizeof(szBuf) - offBuf, SysTime.wHour, 10, 2, 0, RTSTR_F_ZEROPAD | RTSTR_F_WIDTH);292 offBuf += strlen(&szBuf[offBuf]);293 szBuf[offBuf++] = ':';294 295 RTStrFormatU32(&szBuf[offBuf], sizeof(szBuf) - offBuf, SysTime.wMinute, 10, 2, 0, RTSTR_F_ZEROPAD | RTSTR_F_WIDTH);296 offBuf += strlen(&szBuf[offBuf]);297 szBuf[offBuf++] = ':';298 299 RTStrFormatU32(&szBuf[offBuf], sizeof(szBuf) - offBuf, SysTime.wSecond, 10, 2, 0, RTSTR_F_ZEROPAD | RTSTR_F_WIDTH);300 offBuf += strlen(&szBuf[offBuf]);301 szBuf[offBuf++] = '.';302 303 RTStrFormatU32(&szBuf[offBuf], sizeof(szBuf) - offBuf, SysTime.wMilliseconds, 10, 3, 0, RTSTR_F_ZEROPAD | RTSTR_F_WIDTH);304 offBuf += strlen(&szBuf[offBuf]);305 RTStrCat(&szBuf[offBuf], sizeof(szBuf) - offBuf, "Z: Opened log file for ");306 RTStrCat(&szBuf[offBuf], sizeof(szBuf) - offBuf, pszOperation);307 RTStrCat(&szBuf[offBuf], sizeof(szBuf) - offBuf, " of '");308 309 DWORD dwIgn;310 WriteFile(hLogFile, szBuf, (DWORD)strlen(szBuf), &dwIgn, NULL);311 312 char *pszUtf8 = NULL;313 int vrc = RTUtf16ToUtf8(pwszInfFile, &pszUtf8);314 if (RT_SUCCESS(vrc))315 {316 WriteFile(hLogFile, pszUtf8, (DWORD)strlen(pszUtf8), &dwIgn, NULL);317 RTStrFree(pszUtf8);318 WriteFile(hLogFile, RT_STR_TUPLE("'\r\n"), &dwIgn, NULL);319 }320 else321 WriteFile(hLogFile, RT_STR_TUPLE("<RTUtf16ToUtf8 failed>'\r\n"), &dwIgn, NULL);322 }323 159 324 160 #ifdef RT_ARCH_X86 … … 618 454 } 619 455 620 621 /** 622 * Installs or uninstalls a driver. 456 /** 457 * Logging callback for the Windows driver (un)installation code. 458 */ 459 static DECLCALLBACK(void) vboxWinDrvInstLogCallback(VBOXWINDRIVERLOGTYPE enmType, const char *pszMsg, void *pvUser) 460 { 461 HANDLE const hLog = (HANDLE)pvUser; 462 463 /* 464 * Log to standard output: 465 */ 466 switch (enmType) 467 { 468 case VBOXWINDRIVERLOGTYPE_ERROR: 469 PrintSSS("*** Error: ", pszMsg, "\r\n"); 470 break; 471 472 default: 473 PrintSS(pszMsg, "\r\n"); 474 break; 475 } 476 477 /* 478 * Log to file (if any): 479 */ 480 if (hLog != INVALID_HANDLE_VALUE) 481 { 482 char szBuf[1024]; 483 RTStrCopy(szBuf, sizeof(szBuf), enmType == VBOXWINDRIVERLOGTYPE_ERROR ? "*** Error: " : ""); 484 DWORD dwIgn; 485 WriteFile(hLog, szBuf, (DWORD)strlen(szBuf), &dwIgn, NULL); 486 WriteFile(hLog, pszMsg, (DWORD)strlen(pszMsg), &dwIgn, NULL); 487 WriteFile(hLog, RT_STR_TUPLE("\r\n"), &dwIgn, NULL); 488 } 489 } 490 491 /** 492 * Writes the driver log file header. 623 493 * 624 * @return Exit code (EXIT_OK, EXIT_FAIL) 625 * @param fInstall Set to @c true for installation, and @c false 626 * for uninstallation. 627 * @param pwszDriverPath Path to the driver's .INF file. 628 * @param fSilent Set to @c true for silent installation. 629 * @param pwszLogFile Pointer to full qualified path to log file to be 630 * written during installation. Optional. 631 */ 632 static int VBoxInstallDriver(const BOOL fInstall, const wchar_t *pwszDriverPath, bool fSilent, const wchar_t *pwszLogFile) 633 { 634 /* 635 * Windows 2000 and later. 636 */ 637 OSVERSIONINFOW VerInfo = { sizeof(VerInfo) }; 638 GetVersionExW(&VerInfo); 639 if (VerInfo.dwPlatformId != VER_PLATFORM_WIN32_NT) 640 return ErrorMsg("Platform not supported for driver (un)installation!"); 641 if (VerInfo.dwMajorVersion < 5) 642 return ErrorMsg("Platform too old to be supported for driver (un)installation!"); 643 644 /* 645 * Get the full path to the INF file. 646 */ 647 wchar_t wszFullDriverInf[MAX_PATH]; 648 if (GetFullPathNameW(pwszDriverPath, MAX_PATH, wszFullDriverInf, NULL) ==0 ) 649 return ErrorMsgLastErrSWS("GetFullPathNameW failed on '", pwszDriverPath, "'"); 650 651 /* 652 * Load DIFxAPI.dll from our application directory and resolve the symbols we need 653 * from it. We always resolve all for reasons of simplicity and general paranoia. 654 */ 655 HMODULE hModDifXApi = LoadAppDll(L"DIFxAPI.dll"); 656 if (!hModDifXApi) 657 return EXIT_FAIL; 658 659 static struct { FARPROC *ppfn; const char *pszName; } const s_aFunctions[] = 660 { 661 { (FARPROC *)&g_pfnDriverPackageInstall, "DriverPackageInstallW" }, 662 { (FARPROC *)&g_pfnDriverPackageUninstall, "DriverPackageUninstallW" }, 663 { (FARPROC *)&g_pfnDIFXAPISetLogCallback, "DIFXAPISetLogCallbackW" }, 664 }; 665 for (size_t i = 0; i < RT_ELEMENTS(s_aFunctions); i++) 666 { 667 FARPROC pfn = *s_aFunctions[i].ppfn = GetProcAddress(hModDifXApi, s_aFunctions[i].pszName); 668 if (!pfn) 669 return ErrorMsgLastErrSSS("Failed to find symbol '", s_aFunctions[i].pszName, "' in DIFxAPI.dll"); 670 } 671 672 /* 673 * Try open the log file and register a logger callback with DIFx. 674 * Failures here are non-fatal. 675 */ 676 HANDLE hLogFile = INVALID_HANDLE_VALUE; 494 * @returns VBox status code. 495 * @param hLog Handle to log file. 496 * @param pwszInfFile INF file this log belongs to. 497 */ 498 static void driverLogWriteHeader(HANDLE hLog, const wchar_t *pwszInfFile) 499 { 500 /* Don't want to use RTStrPrintf here as it drags in a lot of code, thus this tedium... */ 501 char szBuf[256]; 502 size_t offBuf = 2; 503 RTStrCopy(szBuf, sizeof(szBuf), "\r\n"); 504 505 SYSTEMTIME SysTime = {0}; 506 GetSystemTime(&SysTime); 507 508 RTStrFormatU32(&szBuf[offBuf], sizeof(szBuf) - offBuf, SysTime.wYear, 10, 4, 0, RTSTR_F_ZEROPAD | RTSTR_F_WIDTH); 509 offBuf += strlen(&szBuf[offBuf]); 510 szBuf[offBuf++] = '-'; 511 512 RTStrFormatU32(&szBuf[offBuf], sizeof(szBuf) - offBuf, SysTime.wMonth, 10, 2, 0, RTSTR_F_ZEROPAD | RTSTR_F_WIDTH); 513 offBuf += strlen(&szBuf[offBuf]); 514 szBuf[offBuf++] = '-'; 515 516 RTStrFormatU32(&szBuf[offBuf], sizeof(szBuf) - offBuf, SysTime.wDay, 10, 2, 0, RTSTR_F_ZEROPAD | RTSTR_F_WIDTH); 517 offBuf += strlen(&szBuf[offBuf]); 518 szBuf[offBuf++] = 'T'; 519 520 RTStrFormatU32(&szBuf[offBuf], sizeof(szBuf) - offBuf, SysTime.wHour, 10, 2, 0, RTSTR_F_ZEROPAD | RTSTR_F_WIDTH); 521 offBuf += strlen(&szBuf[offBuf]); 522 szBuf[offBuf++] = ':'; 523 524 RTStrFormatU32(&szBuf[offBuf], sizeof(szBuf) - offBuf, SysTime.wMinute, 10, 2, 0, RTSTR_F_ZEROPAD | RTSTR_F_WIDTH); 525 offBuf += strlen(&szBuf[offBuf]); 526 szBuf[offBuf++] = ':'; 527 528 RTStrFormatU32(&szBuf[offBuf], sizeof(szBuf) - offBuf, SysTime.wSecond, 10, 2, 0, RTSTR_F_ZEROPAD | RTSTR_F_WIDTH); 529 offBuf += strlen(&szBuf[offBuf]); 530 szBuf[offBuf++] = '.'; 531 532 RTStrFormatU32(&szBuf[offBuf], sizeof(szBuf) - offBuf, SysTime.wMilliseconds, 10, 3, 0, RTSTR_F_ZEROPAD | RTSTR_F_WIDTH); 533 offBuf += strlen(&szBuf[offBuf]); 534 RTStrCat(&szBuf[offBuf], sizeof(szBuf) - offBuf, "Z: Opened log file "); 535 536 DWORD dwIgn; 537 WriteFile(hLog, szBuf, (DWORD)strlen(szBuf), &dwIgn, NULL); 538 539 char *pszUtf8 = NULL; 540 int vrc = RTUtf16ToUtf8(pwszInfFile, &pszUtf8); 541 if (RT_SUCCESS(vrc)) 542 { 543 WriteFile(hLog, pszUtf8, (DWORD)strlen(pszUtf8), &dwIgn, NULL); 544 RTStrFree(pszUtf8); 545 WriteFile(hLog, RT_STR_TUPLE("'\r\n"), &dwIgn, NULL); 546 } 547 else 548 WriteFile(hLog, RT_STR_TUPLE("<RTUtf16ToUtf8 failed>'\r\n"), &dwIgn, NULL); 549 } 550 551 /** 552 * Opens (creates / appends) the driver (un)installation log. 553 * 554 * @returns VBox status code. 555 * @param pwszLogFile Path to log file to create / open. If set to NULL, no logging will be performed. 556 * @param phLog Where to return the log handle on success. 557 */ 558 static int driverLogOpen(const wchar_t *pwszLogFile, PHANDLE phLog) 559 { 560 int rc = VINF_SUCCESS; 561 562 /* Failures here are non-fatal. */ 677 563 if (pwszLogFile) 678 564 { 679 hLogFile = CreateFileW(pwszLogFile, FILE_GENERIC_WRITE & ~FILE_WRITE_DATA /* append mode */, FILE_SHARE_READ, 680 NULL /*pSecAttr*/, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL /*hTemplateFile*/); 681 if (hLogFile != INVALID_HANDLE_VALUE) 682 VBoxDIFxWriteLogHeader(hLogFile, fInstall ? "install" : "uninstall", pwszDriverPath); 565 HANDLE hLog = INVALID_HANDLE_VALUE; 566 hLog = CreateFileW(pwszLogFile, FILE_GENERIC_WRITE & ~FILE_WRITE_DATA /* append mode */, FILE_SHARE_READ, 567 NULL /*pSecAttr*/, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL /*hTemplateFile*/); 568 if (hLog != INVALID_HANDLE_VALUE) 569 { 570 driverLogWriteHeader(hLog, pwszLogFile); 571 572 *phLog = hLog; 573 } 683 574 else 575 { 684 576 ErrorMsgLastErrSWS("Failed to open/create log file '", pwszLogFile, "'"); 685 g_pfnDIFXAPISetLogCallback(VBoxDIFxLogCallback, (void *)hLogFile); 686 } 687 688 PrintStr(fInstall ? "Installing driver ...\r\n" : "Uninstalling driver ...\r\n"); 689 PrintSWS("INF-File: '", wszFullDriverInf, "'\r\n"); 690 #ifdef RT_ARCH_X86 691 InstallWinVerifyTrustInterceptorInSetupApi(); 692 #endif 693 694 INSTALLERINFO InstInfo = 695 { 696 L"{7d2c708d-c202-40ab-b3e8-de21da1dc629}", /* Our GUID for representing this installation tool. */ 697 L"VirtualBox Guest Additions Install Helper", 698 L"VirtualBox Guest Additions", /** @todo Add version! */ 699 L"Oracle Corporation" 700 }; 701 702 /* Flags */ 703 DWORD dwFlags = DRIVER_PACKAGE_FORCE; 704 if (!fInstall) 705 dwFlags |= DRIVER_PACKAGE_DELETE_FILES; 706 if (VerInfo.dwMajorVersion < 6 && fInstall) 707 { 708 PrintStr("Using legacy mode for install ...\r\n"); 709 dwFlags |= DRIVER_PACKAGE_LEGACY_MODE; 710 } 711 if (fSilent) 712 { 713 /* Don't add DRIVER_PACKAGE_SILENT to dwFlags here, otherwise the 714 installation will fail because we don't have WHQL certified drivers. 715 See CERT_E_WRONG_USAGE on MSDN for more information. */ 716 PrintStr("Installation is silent ...\r\n"); 717 } 718 719 /* Do the install/uninstall: */ 720 BOOL fReboot = FALSE; 721 DWORD dwErr; 722 if (fInstall) 723 dwErr = g_pfnDriverPackageInstall(wszFullDriverInf, dwFlags, &InstInfo, &fReboot); 724 else 725 dwErr = g_pfnDriverPackageUninstall(wszFullDriverInf, dwFlags, &InstInfo, &fReboot); 726 727 /* 728 * Report error 729 */ 730 int rcExit = EXIT_FAIL; 731 const char *psz = NULL; 732 switch (dwErr) 733 { 734 case ERROR_SUCCESS: 735 rcExit = EXIT_OK; 736 break; 737 738 case CRYPT_E_FILE_ERROR: 739 psz = "The catalog file for the specified driver package was not found!"; 740 break; 741 case ERROR_ACCESS_DENIED: 742 psz = fInstall ? "Caller is not in Administrators group to install this driver package!" 743 : "Caller is not in Administrators group to uninstall this driver package!"; 744 break; 745 case ERROR_BAD_ENVIRONMENT: 746 psz = "The current Microsoft Windows version does not support this operation!"; 747 break; 748 case ERROR_CANT_ACCESS_FILE: 749 psz = "The driver package files could not be accessed!"; 750 break; 751 case ERROR_DEPENDENT_APPLICATIONS_EXIST: 752 psz = "DriverPackageUninstall removed an association between the driver package and the specified application but the function did not uninstall the driver package because other applications are associated with the driver package!"; 753 break; 754 case ERROR_DRIVER_PACKAGE_NOT_IN_STORE: 755 psz = fInstall ? "There is no INF file in the DIFx driver store that corresponds to the INF file being installed!" 756 : "There is no INF file in the DIFx driver store that corresponds to the INF file being uninstalled!"; 757 break; 758 case ERROR_FILE_NOT_FOUND: 759 psz = "INF-file not found!"; 760 break; 761 case ERROR_IN_WOW64: 762 psz = "The calling application is a 32-bit application attempting to execute in a 64-bit environment, which is not allowed!"; 763 break; 764 case ERROR_INVALID_FLAGS: 765 psz = "The flags specified are invalid!"; 766 break; 767 case ERROR_INSTALL_FAILURE: 768 psz = fInstall ? "The install operation failed! Consult the Setup API logs for more information." 769 : "The uninstall operation failed! Consult the Setup API logs for more information."; 770 break; 771 case ERROR_NO_MORE_ITEMS: 772 psz = "The function found a match for the HardwareId value, but the specified driver was not a better match than the current driver and the caller did not specify the INSTALLFLAG_FORCE flag!"; 773 break; 774 case ERROR_NO_DRIVER_SELECTED: 775 psz = "No driver in .INF-file selected!"; 776 break; 777 case ERROR_SECTION_NOT_FOUND: 778 psz = "Section in .INF-file was not found!"; 779 break; 780 case ERROR_SHARING_VIOLATION: 781 psz = "A component of the driver package in the DIFx driver store is locked by a thread or process!"; 782 break; 783 784 /* 785 * ! sig: Verifying file against specific Authenticode(tm) catalog failed! (0x800b0109) 786 * ! sig: Error 0x800b0109: A certificate chain processed, but terminated in a root certificate which is not trusted by the trust provider. 787 * !!! sto: No error message will be displayed as client is running in non-interactive mode. 788 * !!! ndv: Driver package failed signature validation. Error = 0xE0000247 789 */ 790 case ERROR_DRIVER_STORE_ADD_FAILED: 791 psz = "Adding driver to the driver store failed!!"; 792 break; 793 case ERROR_UNSUPPORTED_TYPE: 794 psz = "The driver package type is not supported of INF-file!"; 795 break; 796 case ERROR_NO_SUCH_DEVINST: 797 psz = "The driver package was installed but no matching devices found in the device tree (ERROR_NO_SUCH_DEVINST)."; 798 /* GA installer should ignore this error code and continue */ 799 rcExit = EXIT_OK; 800 break; 801 802 default: 803 { 804 /* Try error lookup with GetErrorMsg(). */ 805 ErrorMsgSWS(fInstall ? "Installation of '" : "Uninstallation of '", wszFullDriverInf, "' failed!"); 806 ErrorMsgBegin("dwErr="); 807 ErrorMsgErrVal(dwErr, false); 808 WCHAR wszErrMsg[1024]; 809 if (GetErrorMsg(dwErr, wszErrMsg, RT_ELEMENTS(wszErrMsg))) 810 { 811 ErrorMsgStr(": "); 812 ErrorMsgWStr(wszErrMsg); 813 } 814 ErrorMsgEnd(NULL); 815 break; 816 } 817 } 818 if (psz) 819 { 820 ErrorMsgSWS(fInstall ? "Installation of '" : "Uninstallation of '", wszFullDriverInf, "' failed!"); 821 ErrorMsgBegin("dwErr="); 822 ErrorMsgErrVal(dwErr, false); 823 ErrorMsgStr(": "); 824 ErrorMsgEnd(psz); 825 } 826 827 /* Close the log file. */ 828 if (pwszLogFile) 829 { 830 g_pfnDIFXAPISetLogCallback(NULL, NULL); 831 if (hLogFile != INVALID_HANDLE_VALUE) 832 CloseHandle(hLogFile); 833 } 834 if (rcExit == EXIT_OK) 835 { 836 PrintStr(fInstall ? "Driver was installed successfully!\r\n" 837 : "Driver was uninstalled successfully!\r\n"); 838 if (fReboot) 839 { 840 PrintStr(fInstall ? "A reboot is needed to complete the driver installation!\r\n" 841 : "A reboot is needed to complete the driver uninstallation!\r\n"); 842 /** @todo r=bird: We don't set EXIT_REBOOT here for some reason... The 843 * ExecuteInf didn't use EXIT_REBOOT either untill the no-CRT rewrite, 844 * so perhaps the EXIT_REBOOT stuff can be removed? */ 845 } 846 } 847 848 return rcExit; 849 } 850 577 rc = VERR_CANT_CREATE; 578 } 579 } 580 581 return rc; 582 } 583 584 /** 585 * Closes the driver (un)installation log. 586 * 587 * @returns VBox status code. 588 * @param hLog Handle of log to close. 589 */ 590 static int driverLogClose(HANDLE hLog) 591 { 592 if (hLog != INVALID_HANDLE_VALUE) 593 CloseHandle(hLog); 594 595 return VINF_SUCCESS; 596 } 851 597 852 598 /** Handles 'driver install'. */ 853 599 static int handleDriverInstall(unsigned cArgs, wchar_t **papwszArgs) 854 600 { 855 return VBoxInstallDriver(true /*fInstall*/, papwszArgs[0], false /*fSilent*/, 856 cArgs > 1 && papwszArgs[1][0] ? papwszArgs[1] : NULL /* pwszLogFile*/); 857 } 858 601 char *pszInfFile = NULL; 602 int rc = RTUtf16ToUtf8(papwszArgs[0], &pszInfFile); 603 if (RT_SUCCESS(rc)) 604 { 605 char *pszPnpId = NULL; /* PnP ID can be optional. */ 606 if (cArgs >= 2) 607 rc = RTUtf16ToUtf8(papwszArgs[1], &pszPnpId); 608 if (RT_SUCCESS(rc)) 609 { 610 HANDLE hLog = INVALID_HANDLE_VALUE; 611 if (cArgs >= 3) 612 /* ignore rc, non-fatal */ driverLogOpen(papwszArgs[2], &hLog); 613 #ifdef DEBUG 614 PrintSSS("INF File: ", pszInfFile, "\r\n"); 615 PrintSSS(" PnP ID: ", pszPnpId ? pszPnpId : "<None>", "\r\n"); 616 #endif 617 VBOXWINDRVINST hWinDrvInst; 618 rc = VBoxWinDrvInstCreateEx(&hWinDrvInst, 4 /* Verbosity */, &vboxWinDrvInstLogCallback, hLog /* pvUser */); 619 if (RT_SUCCESS(rc)) 620 { 621 rc = VBoxWinDrvInstInstall(hWinDrvInst, pszInfFile, pszPnpId, 622 VBOX_WIN_DRIVERINSTALL_F_SILENT | VBOX_WIN_DRIVERINSTALL_F_FORCE); 623 624 VBoxWinDrvInstDestroy(hWinDrvInst); 625 } 626 627 driverLogClose(hLog); 628 hLog = INVALID_HANDLE_VALUE; 629 630 RTStrFree(pszPnpId); 631 } 632 RTStrFree(pszInfFile); 633 } 634 635 return rc == VINF_REBOOT_NEEDED ? EXIT_REBOOT : RT_SUCCESS(rc) ? EXIT_OK : EXIT_FAIL; 636 } 859 637 860 638 /** Handles 'driver uninstall'. */ 861 639 static int handleDriverUninstall(unsigned cArgs, wchar_t **papwszArgs) 862 640 { 863 return VBoxInstallDriver(false /*fInstall*/, papwszArgs[0], false /*fSilent*/, 864 cArgs > 1 && papwszArgs[1][0] ? papwszArgs[1] : NULL /* pwszLogFile*/); 865 } 866 867 868 /** 869 * Implementes PSP_FILE_CALLBACK_W, used by ExecuteInfFile. 870 */ 871 static UINT CALLBACK 872 vboxDrvInstExecuteInfFileCallback(PVOID pvContext, UINT uNotification, UINT_PTR uParam1, UINT_PTR uParam2) RT_NOTHROW_DEF 873 { 641 char *pszInfFile = NULL; 642 int rc = RTUtf16ToUtf8(papwszArgs[0], &pszInfFile); 643 if (RT_SUCCESS(rc)) 644 { 645 char *pszModel = NULL; /* Model is optional. */ 646 if (cArgs >= 2) 647 rc = RTUtf16ToUtf8(papwszArgs[1], &pszModel); 648 char *pszPnpId = NULL; /* PnP ID is optional. */ 649 if (cArgs >= 3) 650 rc = RTUtf16ToUtf8(papwszArgs[2], &pszPnpId); 651 if (RT_SUCCESS(rc)) 652 { 653 HANDLE hLog = INVALID_HANDLE_VALUE; 654 if (cArgs >= 3) 655 /* ignore rc, non-fatal */ driverLogOpen(papwszArgs[2], &hLog); 656 874 657 #ifdef DEBUG 875 PrintSXS("Got installation notification ", uNotification, "\r\n"); 658 PrintSSS("INF File: ", pszInfFile, "\r\n"); 659 PrintSSS(" Model: ", pszModel ? pszModel : "<None>", "\r\n"); 660 PrintSSS(" PnP ID: ", pszPnpId ? pszPnpId : "<None>", "\r\n"); 876 661 #endif 877 878 switch (uNotification) 879 { 880 case SPFILENOTIFY_NEEDMEDIA: 881 PrintStr("Requesting installation media ...\r\n"); 882 break; 883 884 case SPFILENOTIFY_STARTCOPY: 885 PrintStr("Copying driver files to destination ...\r\n"); 886 break; 887 888 case SPFILENOTIFY_TARGETNEWER: 889 case SPFILENOTIFY_TARGETEXISTS: 890 return TRUE; 891 } 892 893 return SetupDefaultQueueCallbackW(pvContext, uNotification, uParam1, uParam2); 894 } 895 896 897 /** 898 * Executes a specific .INF section to install/uninstall drivers and/or 899 * services. 900 * 901 * @return Exit code (EXIT_OK, EXIT_FAIL, EXIT_REBOOT) 902 * @param pwszSection Section to execute; usually it's L"DefaultInstall". 903 * @param pwszInf Path of the .INF file to use. 904 */ 905 static int ExecuteInfFile(const wchar_t *pwszSection, const wchar_t *pwszInf) 906 { 907 PrintSWSWS("Installing from INF-File: '", pwszInf, "', Section: '", pwszSection, "' ...\r\n"); 908 #ifdef RT_ARCH_X86 909 InstallWinVerifyTrustInterceptorInSetupApi(); 910 #endif 911 912 UINT uErrorLine = 0; 913 HINF hInf = SetupOpenInfFileW(pwszInf, NULL, INF_STYLE_WIN4, &uErrorLine); 914 if (hInf == INVALID_HANDLE_VALUE) 915 return ErrorMsgLastErrSWSRSUS("SetupOpenInfFileW failed to open '", pwszInf, "' ", ", error line ", uErrorLine, NULL); 916 917 int rcExit = EXIT_FAIL; 918 PVOID pvQueue = SetupInitDefaultQueueCallback(NULL); 919 if (pvQueue) 920 { 921 if (SetupInstallFromInfSectionW(NULL /*hWndOwner*/, hInf, pwszSection, SPINST_ALL, HKEY_LOCAL_MACHINE, 922 NULL /*pwszSrcRootPath*/, SP_COPY_NEWER_OR_SAME | SP_COPY_NOSKIP, 923 vboxDrvInstExecuteInfFileCallback, pvQueue, NULL /*hDevInfoSet*/, NULL /*pDevInfoData*/)) 924 { 925 PrintStr("File installation stage successful\r\n"); 926 927 if (SetupInstallServicesFromInfSectionW(hInf, L"DefaultInstall.Services", 0 /* Flags */)) 662 VBOXWINDRVINST hWinDrvInst; 663 rc = VBoxWinDrvInstCreateEx(&hWinDrvInst, 4 /* Verbosity */, &vboxWinDrvInstLogCallback, hLog /* pvUser */); 664 if (RT_SUCCESS(rc)) 928 665 { 929 PrintStr("Service installation stage successful. Installation completed.\r\n"); 930 rcExit = EXIT_OK; 666 rc = VBoxWinDrvInstUninstall(hWinDrvInst, pszInfFile, pszModel, pszPnpId, 667 VBOX_WIN_DRIVERINSTALL_F_SILENT | VBOX_WIN_DRIVERINSTALL_F_FORCE); 668 669 VBoxWinDrvInstDestroy(hWinDrvInst); 931 670 } 932 else if (GetLastError() == ERROR_SUCCESS_REBOOT_REQUIRED) 933 { 934 PrintStr("A reboot is required to complete the installation\r\n"); 935 rcExit = EXIT_REBOOT; 936 } 937 else 938 ErrorMsgLastErrSWSWS("SetupInstallServicesFromInfSectionW failed on '", pwszSection, "' in '", pwszInf, "'"); 939 } 940 SetupTermDefaultQueueCallback(pvQueue); 941 } 942 else 943 ErrorMsgLastErr("SetupInitDefaultQueueCallback failed"); 944 SetupCloseInfFile(hInf); 945 return rcExit; 671 672 driverLogClose(hLog); 673 hLog = INVALID_HANDLE_VALUE; 674 675 RTStrFree(pszPnpId); 676 } 677 RTStrFree(pszInfFile); 678 } 679 680 return rc == VINF_REBOOT_NEEDED ? EXIT_REBOOT : RT_SUCCESS(rc) ? EXIT_OK : EXIT_FAIL; 946 681 } 947 682 … … 950 685 static int handleDriverExecuteInf(unsigned cArgs, wchar_t **papwszArgs) 951 686 { 952 RT_NOREF(cArgs); 953 return ExecuteInfFile(L"DefaultInstall", papwszArgs[0]); 687 char *pszInfFile = NULL; 688 int rc = RTUtf16ToUtf8(papwszArgs[0], &pszInfFile); 689 if (RT_SUCCESS(rc)) 690 { 691 char *pszSection = NULL; /* Section is optional. */ 692 if (cArgs >= 2) 693 rc = RTUtf16ToUtf8(papwszArgs[1], &pszSection); 694 if (RT_SUCCESS(rc)) 695 { 696 HANDLE hLog = INVALID_HANDLE_VALUE; 697 if (cArgs >= 3) 698 /* ignore rc, non-fatal */ driverLogOpen(papwszArgs[2], &hLog); 699 700 #ifdef DEBUG 701 PrintSSS("INF File: ", pszInfFile, "\r\n"); 702 PrintSSS(" Section: ", pszSection ? pszSection : "DefaultInstall", "\r\n"); 703 #endif 704 VBOXWINDRVINST hWinDrvInst; 705 rc = VBoxWinDrvInstCreateEx(&hWinDrvInst, 4 /* Verbosity */, &vboxWinDrvInstLogCallback, hLog /* pvUser */); 706 if (RT_SUCCESS(rc)) 707 { 708 rc = VBoxWinDrvInstInstallExecuteInf(hWinDrvInst, pszInfFile, pszSection ? pszSection : "DefaultInstall", 709 VBOX_WIN_DRIVERINSTALL_F_SILENT | VBOX_WIN_DRIVERINSTALL_F_FORCE); 710 VBoxWinDrvInstDestroy(hWinDrvInst); 711 } 712 713 driverLogClose(hLog); 714 hLog = INVALID_HANDLE_VALUE; 715 } 716 RTStrFree(pszInfFile); 717 } 718 719 return rc == VINF_REBOOT_NEEDED ? EXIT_REBOOT : RT_SUCCESS(rc) ? EXIT_OK : EXIT_FAIL; 954 720 } 955 721 … … 2458 2224 "\r\n" 2459 2225 "Drivers:\r\n" 2460 " VBoxDrvInst driver install <inf-file> [ log-file]\r\n"2461 " VBoxDrvInst driver uninstall <inf-file> [log-file]\r\n"2462 " VBoxDrvInst driver executeinf <inf-file> \r\n"2226 " VBoxDrvInst driver install <inf-file> [pnp-id] [log-file]\r\n" 2227 " VBoxDrvInst driver uninstall <inf-file> <model> [pnp-id] [log-file]\r\n" 2228 " VBoxDrvInst driver executeinf <inf-file> [section]\r\n" 2463 2229 " VBoxDrvInst driver nt4-install-video [install-dir]\r\n" 2464 2230 "\r\n" … … 2494 2260 int wmain(int argc, wchar_t **argv) 2495 2261 { 2496 /* Not initializing IPRT here, ASSUMING the little bit we use of it does 2497 not need any initialization. Reduces the binary size a little. */ 2262 int rc = RTR3InitExeNoArguments(0); 2263 if (RT_FAILURE(rc)) 2264 return RTMsgInitFailure(rc); 2498 2265 2499 2266 static struct … … 2505 2272 } s_aActions[] = 2506 2273 { 2507 { "driver", "install", 1, 2, handleDriverInstall },2508 { "driver", "uninstall", 1, 2, handleDriverUninstall },2509 { "driver", "executeinf", 1, 1, handleDriverExecuteInf },2274 { "driver", "install", 1, 3, handleDriverInstall }, 2275 { "driver", "uninstall", 2, 4, handleDriverUninstall }, 2276 { "driver", "executeinf", 1, 3, handleDriverExecuteInf }, 2510 2277 { "driver", "nt4-install-video", 0, 1, handleDriverNt4InstallVideo }, 2511 2278 { "service", "create", 5, 9, handleServiceCreate }, -
trunk/src/VBox/Additions/WINNT/Installer/VBoxGuestAdditionsCommon.nsh
r106061 r106321 56 56 !endif 57 57 58 FILE "$%VBOX_PATH_DIFX%\DIFxAPI.dll"59 58 FILE "$%PATH_OUT%\bin\additions\VBoxDrvInst.exe" 60 59 … … 215 214 SetOutPath "$0\Tools" 216 215 FILE "$%PATH_OUT%\bin\additions\VBoxDrvInst.exe" 217 FILE "$%VBOX_PATH_DIFX%\DIFxAPI.dll"218 216 !ifdef VBOX_WITH_ADDITIONS_SHIPPING_AUDIO_TEST 219 217 FILE "$%PATH_OUT%\bin\additions\VBoxAudioTest.exe" -
trunk/src/VBox/Additions/WINNT/Installer/VBoxGuestAdditionsUninstall.nsh
r106061 r106321 35 35 ; Remove common files 36 36 Delete /REBOOTOK "$INSTDIR\VBoxDrvInst.exe" 37 Delete /REBOOTOK "$INSTDIR\DIFxAPI.dll"38 37 39 38 Delete /REBOOTOK "$INSTDIR\VBoxVideo.inf" … … 132 131 exit: 133 132 133 ; 134 ; Dump UI log to on success too. Only works with non-silent installs. 135 ; (This has to be done here rather than in .onUninstSuccess, because by 136 ; then the log is no longer visible in the UI.) 137 ; 138 ${IfNot} ${Silent} 139 !if $%VBOX_WITH_GUEST_INSTALL_HELPER% == "1" 140 VBoxGuestInstallHelper::DumpLog "$TEMP\vbox_uninstall_ui.log" 141 !else 142 StrCpy $0 "$TEMP\vbox_uninstall_ui.log" 143 Push $0 144 Call DumpLog 145 !endif 146 ${EndIf} 147 134 148 FunctionEnd 135 149 !macroend -
trunk/src/VBox/Additions/WINNT/Installer/VBoxGuestAdditionsW2KXP.nsh
r106061 r106321 344 344 !endif 345 345 ${EndIf} 346 347 ; Log the certificates present on the system.348 ${CmdExecute} "$\"$INSTDIR\cert\VBoxCertUtil.exe$\" display-all" 'non-zero-exitcode=log'349 346 !endif ; VBOX_SIGN_ADDITIONS 350 347 … … 514 511 ${If} $g_bNoGuestDrv == "false" 515 512 ${LogVerbose} "Installing guest driver ..." 516 ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" driver install $\"$INSTDIR\VBoxGuest$g_strEarlyNTDrvInfix.inf$\" $\" $INSTDIR\install_drivers.log$\"" 'non-zero-exitcode=abort'513 ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" driver install $\"$INSTDIR\VBoxGuest$g_strEarlyNTDrvInfix.inf$\" $\"PCI\VEN_80EE&DEV_CAFE$\" $\"$INSTDIR\install_drivers.log$\"" 'non-zero-exitcode=abort' 517 514 ${Else} 518 515 ${LogVerbose} "Guest driver installation skipped!" … … 522 519 ${If} $g_bWithWDDM == "true" 523 520 ${LogVerbose} "Installing WDDM video driver..." 524 ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" driver install $\"$INSTDIR\VBoxWddm.inf$\" $\"$ INSTDIR\install_drivers.log$\"" 'non-zero-exitcode=abort'521 ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" driver install $\"$INSTDIR\VBoxWddm.inf$\" $\"$\" $\"$INSTDIR\install_drivers.log$\"" 'non-zero-exitcode=abort' 525 522 ${Else} 526 523 ${LogVerbose} "Installing video driver ..." 527 ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" driver install $\"$INSTDIR\VBoxVideo$g_strEarlyNTDrvInfix.inf$\" $\"$ INSTDIR\install_drivers.log$\"" 'non-zero-exitcode=abort'524 ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" driver install $\"$INSTDIR\VBoxVideo$g_strEarlyNTDrvInfix.inf$\" $\"$\" $\"$INSTDIR\install_drivers.log$\"" 'non-zero-exitcode=abort' 528 525 ${EndIf} 529 526 ${Else} … … 536 533 ${If} $g_bNoMouseDrv == "false" 537 534 ${LogVerbose} "Installing mouse driver ..." 538 ; The mouse filter does not contain any device IDs but a "DefaultInstall" section; 539 ; so this .INF file needs to be installed using "InstallHinfSection" which is implemented 540 ; with VBoxDrvInst's "driver executeinf" routine 541 ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" driver install $\"$INSTDIR\VBoxMouse.inf$\"" 'non-zero-exitcode=abort' 535 ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" driver executeinf $\"$INSTDIR\VBoxMouse.inf$\" $\"DefaultInstall.NT$%KBUILD_TARGET_ARCH%$\" $\"$INSTDIR\install_drivers.log$\"" 'non-zero-exitcode=abort' 542 536 ${Else} 543 537 ${LogVerbose} "Mouse driver installation skipped!" … … 690 684 ; Remove VirtualBox video driver 691 685 ${LogVerbose} "Uninstalling video driver ..." 692 ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" driver uninstall $\"$INSTDIR\VBoxVideo$g_strEarlyNTDrvInfix.inf$\" " 'non-zero-exitcode=log'686 ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" driver uninstall $\"$INSTDIR\VBoxVideo$g_strEarlyNTDrvInfix.inf$\" $\"VBoxVideo*$\"" 'non-zero-exitcode=log' 693 687 ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" service delete VBoxVideo" 'non-zero-exitcode=log' 694 688 Delete /REBOOTOK "$g_strSystemDir\drivers\VBoxVideo.sys" … … 699 693 700 694 ${LogVerbose} "Uninstalling WDDM video driver..." 701 ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" driver uninstall $\"$INSTDIR\VBoxWddm.inf$\" " 'non-zero-exitcode=log'695 ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" driver uninstall $\"$INSTDIR\VBoxWddm.inf$\" $\"VBoxWddm*$\"" 'non-zero-exitcode=log' 702 696 ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" service delete VBoxWddm" 'non-zero-exitcode=log' 703 697 ;misha> @todo driver file removal (as well as service removal) should be done as driver package uninstall … … 707 701 ; Obsolete files begin 708 702 ${LogVerbose} "Uninstalling WDDM video driver for Windows 8..." 709 ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" driver uninstall $\"$INSTDIR\VBoxVideoW8.inf$\" " 'non-zero-exitcode=log'703 ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" driver uninstall $\"$INSTDIR\VBoxVideoW8.inf$\" $\"VBoxVideoW8*$\"" 'non-zero-exitcode=log' 710 704 ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" service delete VBoxVideoW8" 'non-zero-exitcode=log' 711 705 ;misha> @todo driver file removal (as well as service removal) should be done as driver package uninstall … … 714 708 715 709 ${LogVerbose} "Uninstalling WDDM video driver for Windows Vista and 7..." 716 ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" driver uninstall $\"$INSTDIR\VBoxVideoWddm.inf$\" " 'non-zero-exitcode=log'710 ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" driver uninstall $\"$INSTDIR\VBoxVideoWddm.inf$\" $\"VBoxVideoWddm*$\"" 'non-zero-exitcode=log' 717 711 ; Always try to remove both VBoxVideoWddm & VBoxVideo services no matter what is installed currently 718 712 ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" service delete VBoxVideoWddm" 'non-zero-exitcode=log' … … 751 745 ; Remove mouse driver 752 746 ${LogVerbose} "Removing mouse driver ..." 753 ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" service delete VBoxMouse" 'non-zero-exitcode=log'754 Delete /REBOOTOK "$g_strSystemDir\drivers\VBoxMouse.sys"747 ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" driver uninstall $\"$INSTDIR\VBoxMouse.inf$\" $\"VBoxMouse*$\"" 'non-zero-exitcode=log' 748 ; @todo Fix VBoxMouse.inf to also take care of the next line! 755 749 ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" registry delmultisz $\"SYSTEM\CurrentControlSet\Control\Class\{4D36E96F-E325-11CE-BFC1-08002BE10318}$\" $\"UpperFilters$\" $\"VBoxMouse$\"" 'non-zero-exitcode=log' 756 750 … … 776 770 ; Remove guest driver 777 771 ${LogVerbose} "Removing guest driver ..." 778 ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" driver uninstall $\"$INSTDIR\VBoxGuest$g_strEarlyNTDrvInfix.inf$\" " 'non-zero-exitcode=log'772 ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" driver uninstall $\"$INSTDIR\VBoxGuest$g_strEarlyNTDrvInfix.inf$\" $\"VBoxGuest*$\"" 'non-zero-exitcode=log' 779 773 780 774 ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" service delete VBoxGuest" 'non-zero-exitcode=log' -
trunk/src/VBox/Additions/WINNT/Mouse/NT5/VBoxMouse.inf
r106061 r106321 34 34 ;edit-DriverVer=08/26/2008,2.00.0000 35 35 ;cat CatalogFile=VBoxMouse.cat 36 ;PnpLockdown=1 36 37 37 38 [SourceDisksNames] 38 1 = %VBoxMouse .MediaDesc%39 1 = %VBoxMouse_DiskDesc%,,, 39 40 40 41 [SourceDisksFiles] … … 44 45 DefaultDestDir = 12 ; DIRID_DRIVERS 45 46 46 ; Disabled install via [Manufacturer], not working. See [DefaultInstall]. 47 ;[Manufacturer] 48 ;%ORACLE%=VBoxMouse@COMMA-NT-ARCH@ 49 ; 50 ;[VBoxMouse@DOT-NT-ARCH@] 51 ;%VBoxMouse.SvcDesc%=VBoxMouse_Install 52 ; 53 ;[VBoxMouse_Install] 54 ;CopyFiles = @VBoxMouse.sys 55 ; 56 ;[VBoxMouse_Install.Services] 57 ;AddService = VBoxMouse,,VBoxMouse.Service 47 ; Do *not* add a [Manufacturer] section, as this is a so-called "primitive driver". 48 ; Adding such a section will make InfVerif.exe fail. 58 49 59 50 [DefaultInstall@DOT-NT-ARCH@] 60 CopyFiles = @VBoxMouse.sys 51 %ORACLE%=VBoxMouse@COMMA-NT-ARCH@ 52 CopyFiles = VBoxMouse_CopyFiles 61 53 62 54 [DefaultInstall@[email protected]] 63 AddService = VBoxMouse, ,VBoxMouse.Service55 AddService = VBoxMouse,0x00000002,VBoxMouse_Service 64 56 65 [VBoxMouse.AddRegistry] 57 [DefaultUninstall@DOT-NT-ARCH@] 58 [email protected] 59 LegacyUninstall=1 60 61 [DefaultUninstall@[email protected]] 62 DelService = VBoxMouse,0x00000200 63 LegacyUninstall = 1 64 65 [VBoxMouse_AddReg] 66 66 HKLM, System\CurrentControlSet\Control\Class\{4D36E96F-E325-11CE-BFC1-08002BE10318}, UpperFilters, 0x00010000, "VBoxMouse", "mouclass" 67 67 68 [VBoxMouse.Service] 69 DisplayName = %VBoxMouse.SvcDesc% 68 [VBoxMouse_CopyFiles] 69 VBoxMouse.sys 70 71 [VBoxMouse_Service] 72 DisplayName = %VBoxMouse_SvcDesc% 70 73 ServiceType = %SERVICE_KERNEL_DRIVER% 71 74 StartType = %SERVICE_DEMAND_START% 72 75 ErrorControl = %SERVICE_ERROR_IGNORE% 73 76 ServiceBinary = %12%\VBoxMouse.sys 74 AddReg = VBoxMouse .AddRegistry77 AddReg = VBoxMouse_AddReg 75 78 76 79 [Strings] 77 VBoxMouse.SvcDesc = "VirtualBox Guest Mouse Service" 78 VBoxMouse.MediaDesc = "VirtualBox Guest Mouse Driver Installation Media" 79 ORACLE = "Oracle Corporation" 80 ORACLE = "Oracle Corporation" 81 VBoxMouse_SvcDesc ="VirtualBox Guest Mouse Service" 82 VBoxMouse_DrvDesc ="VirtualBox Guest Mouse Driver" 83 VBoxMouse_DiskDesc ="VBoxMouse Installation Disk" 80 84 81 85 ; Useful constants … … 83 87 SERVICE_DEMAND_START = 3 84 88 SERVICE_ERROR_IGNORE = 0 89 SERVICE_ERROR_NORMAL = 1 90 -
trunk/src/VBox/Additions/WINNT/include/NoCrtOutput.h
r106240 r106321 489 489 490 490 491 DECLINLINE(void) PrintSS(const char *pszMsg1, const char *pszMsg2) 492 { 493 PrintStr(pszMsg1); 494 PrintStr(pszMsg2); 495 } 496 497 498 DECLINLINE(void) PrintSSS(const char *pszMsg1, const char *pszMsg2, const char *pszMsg3) 499 { 500 PrintStr(pszMsg1); 501 PrintStr(pszMsg2); 502 PrintStr(pszMsg3); 503 } 504 505 491 506 DECLINLINE(void) PrintSWS(const char *pszMsg1, const wchar_t *pwszMsg2, const char *pszMsg3) 492 507 { -
trunk/src/VBox/Additions/common/VBoxGuest/Makefile.kmk
r106061 r106321 53 53 VBoxGuest_NAME.solaris = vboxguest 54 54 VBoxGuest_INST.darwin = $(INST_ADDITIONS)VBoxGuest.kext/Contents/MacOS/ 55 if defined(VBOX_SIGNING_MODE) && defined(VBOX_SIGN_ADDITIONS) # See Additions/WINNT/Makefile.kmk?55 #if defined(VBOX_SIGNING_MODE) && defined(VBOX_SIGN_ADDITIONS) # See Additions/WINNT/Makefile.kmk? 56 56 VBoxGuest_INSTTYPE.win = none 57 57 VBoxGuest_DEBUG_INSTTYPE.win = both 58 endif58 #endif 59 59 VBoxGuest_DEFS.haiku = VBOX_SVN_REV=$(VBOX_SVN_REV) _KERNEL_MODE=1 60 60 VBoxGuest_DEFS.solaris = VBOX_SVN_REV=$(VBOX_SVN_REV) … … 114 114 endif # win 115 115 ifn1of ($(KBUILD_TARGET), linux freebsd netbsd solaris haiku) 116 VBoxGuest_SOURCES 116 VBoxGuest_SOURCES += VBoxGuest-$(KBUILD_TARGET).cpp 117 117 else 118 VBoxGuest_SOURCES 118 VBoxGuest_SOURCES += VBoxGuest-$(KBUILD_TARGET).c 119 119 VBoxGuest_$(KBUILD_TARGET).c_DEPS = $(VBOX_SVN_REV_HEADER) 120 120 ifeq ($(KBUILD_TARGET),freebsd) … … 125 125 VBoxGuest.cpp 126 126 VBoxGuest_SOURCES.win += \ 127 win/VBoxGuest.inf \ 127 128 win/VBoxGuest.rc 128 129 VBoxGuest_SOURCES.win.x86 += \ -
trunk/src/VBox/Additions/common/VBoxGuest/win/VBoxGuest.inf
r106208 r106321 43 43 ;edit-DriverVer=08/26/2008,2.00.0000 44 44 ;cat CatalogFile=VBoxGuest.cat 45 ;PnpLockdown=1 45 46 46 47 [SourceDisksNames] 47 1 = %VBoxGuest .MediaDesc%48 1 = %VBoxGuest_MediaDesc%,,, 48 49 49 50 [SourceDisksFiles] … … 53 54 54 55 [DestinationDirs] 55 DefaultDestDir= 12 ; drivers56 VBoxGuest_CopyFiles = 12 ; drivers 56 57 VBoxTray_CopyFiles = 11 ; system32 57 58 … … 64 65 [VBoxGuest_Install] 65 66 CopyFiles = VBoxGuest_CopyFiles, VBoxTray_CopyFiles 66 AddReg = VBoxTray_Add _Reg67 AddReg = VBoxTray_AddReg 67 68 68 69 [VBoxGuest_CopyFiles] … … 74 75 75 76 [VBoxGuest_Install.Services] 76 AddService = VBoxGuest, 0x00000002, VBoxGuest_ ServiceInstallSection77 AddService = VBoxGuest, 0x00000002, VBoxGuest_AddService 77 78 DelService = VBoxTray, 0x00000004 78 79 79 [VBoxGuest_ ServiceInstallSection]80 DisplayName = %VBoxGuest_ svcdesc%81 ServiceType = 0x00000001 ; kernel driver82 StartType = 0x00000000 ; boot start83 ErrorControl = 0x00000001 ; normal error handling80 [VBoxGuest_AddService] 81 DisplayName = %VBoxGuest_SvcDesc% 82 ServiceType = %SERVICE_TYPE_KERNEL_DRIVER% 83 StartType = %SERVICE_STARTTYPE_BOOT% 84 ErrorControl = %SERVICE_ERRORCTL_NORMAL% 84 85 LoadOrderGroup = Base 85 86 ServiceBinary = %12%\VBoxGuest.sys 86 87 87 [VBoxTray_Add _Reg]88 [VBoxTray_AddReg] 88 89 HKLM, SOFTWARE\Microsoft\Windows\CurrentVersion\Run, VBoxTray, 0x00020000, %%SystemRoot%%\system32\VBoxTray.exe 89 90 … … 94 95 ORACLE = "Oracle Corporation" 95 96 VBoxGuest.DeviceDesc = "VirtualBox Guest Device" 96 VBoxGuest_svcdesc = "VirtualBox Guest Driver" 97 VBoxTray_svcdesc = "VirtualBox Guest Tray" 98 VBoxGuest.MediaDesc = "VirtualBox Guest Driver Installation Disk" 97 VBoxGuest_SvcDesc = "VirtualBox Guest Driver" 98 VBoxTray_SvcDesc = "VirtualBox Guest Tray" 99 VBoxGuest_MediaDesc = "VirtualBox Guest Driver Installation Disk" 100 101 ; Useful constants 102 SERVICE_TYPE_KERNEL_DRIVER = 1 103 SERVICE_STARTTYPE_BOOT = 0 104 SERVICE_STARTTYPE_DEMAND = 3 105 SERVICE_ERRORCTL_IGNORE = 0 106 SERVICE_ERRORCTL_NORMAL = 1 107 -
trunk/src/VBox/HostDrivers/Support/win/VBoxSup.inf
r106061 r106321 43 43 DriverPackageType=KernelService 44 44 ;cat CatalogFile=VBoxSup.cat 45 ;PnpLockdown=1 45 46 46 47 [DestinationDirs] … … 48 49 49 50 [DefaultInstall@DOT-NT-ARCH@] 51 %ORACLE%=VBoxSup@COMMA-NT-ARCH@ 50 52 CopyFiles=VBoxSup_CopyFiles 51 53 … … 61 63 LegacyUninstall=1 62 64 63 ;; This does not actually work either (see VBoxUSBMon), though it triggers in the 64 ;; installer rather at manual installation on my test system (could be polluted & confused). 65 ;; This may apparently also causes unloading trouble due to 'root\VBoxSup' or something related to that. 66 ;; [Manufacturer] 67 ;; %ORACLE%=VBoxSup@COMMA-NT-ARCH@ 68 ;; 69 ;; ; Models section (referenced by [Manufacturer]). 70 ;; [VBoxSup@DOT-NT-ARCH@] 71 ;; %VBoxSup.DRVDESC%=VBoxSup_Install,root\VBoxSup 72 ;; 73 ;; [VBoxSup_Install@DOT-NT-ARCH@] 74 ;; CopyFiles=VBoxSup_CopyFiles 75 ;; 76 ;; [VBoxSup_Install@[email protected]] 77 ;; AddService=VBoxSup,0x00000002,VBoxSup_Service 65 [Manufacturer] 66 %ORACLE%=VBoxSup@COMMA-NT-ARCH@ 67 68 [VBoxSup@DOT-NT-ARCH@] 69 %VBoxSup.DRVDESC%=VBoxSup_Install 70 71 [VBoxSup_Install@DOT-NT-ARCH@] 72 CopyFiles=VBoxSup_CopyFiles 73 74 [VBoxSup_Install@[email protected]] 75 AddService=VBoxSup,0x00000002,VBoxSup_Service 78 76 79 77 [SourceDisksFiles] … … 88 86 [VBoxSup_Service] 89 87 DisplayName = %VBoxSup.SVCDESC% 90 ServiceType = 1 ; SERVICE_KERNEL_DRIVER 91 ;StartType = 3 ; SERVICE_DEMAND_START 92 StartType = 1 ; autostart to fix Vista problem 93 ErrorControl = 1 ; SERVICE_ERROR_NORMAL 88 ServiceType = %SERVICE_TYPE_KERNEL_DRIVER% 89 StartType = %SERVICE_STARTTYPE_AUTO% 90 ErrorControl = %SERVICE_ERRORCTL_NORMAL% 94 91 ServiceBinary = %12%\VBoxSup.sys 95 92 … … 99 96 VBoxSup.DRVDESC = "VirtualBox Support Driver" 100 97 VBoxSup.DSKDESC = "VirtualBox Support Driver Installation Disk" 98 99 ; Useful constants 100 SERVICE_TYPE_KERNEL_DRIVER = 1 101 SERVICE_STARTTYPE_BOOT = 0 102 SERVICE_STARTTYPE_AUTO = 1 103 SERVICE_STARTTYPE_DEMAND = 3 104 SERVICE_ERRORCTL_IGNORE = 0 105 SERVICE_ERRORCTL_NORMAL = 1 106 -
trunk/src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUSB.inf
r106061 r106321 42 42 ;edit-DriverVer=08/26/2008,2.00.0000 43 43 ;cat CatalogFile=VBoxUSB.cat 44 ;PnpLockdown=1 44 45 45 46 [SourceDisksNames] 46 1=% Disk_Description%,,,47 1=%VBoxUSB_DiskDesc%,,, 47 48 48 49 [SourceDisksFiles] 49 50 VBoxUSB.sys = 1 51 52 [DestinationDirs] 53 DefaultDestDir = 10,System32\Drivers 50 54 51 55 [Manufacturer] … … 53 57 54 58 [VBoxUSB@DOT-NT-ARCH@] 55 % USB\VID_80EE&PID_CAFE.DeviceDesc%=VBoxUSB.Dev,USB\VID_80EE&PID_CAFE59 %VBoxUSB_DrvDesc%=VBoxUSBDev,USB\VID_80EE&PID_CAFE 56 60 57 [ DestinationDirs]58 VBoxUSB.Files.Ext = 10,System32\Drivers 61 [VBoxUSB@[email protected]s] 62 AddService=VBoxUSB,0x00000002,VBoxUSB_Service,VBoxUSB_AddReg 59 63 60 [VBoxUSB .Dev.NT]61 CopyFiles=VBoxUSB .Files.Ext64 [VBoxUSBDev@DOT-NT-ARCH@] 65 CopyFiles=VBoxUSB_CopyFiles 62 66 63 [VBoxUSB.Dev.NT.Services] 64 Addservice = VBoxUSB, 0x00000002, VBoxUSB.AddService 67 [DefaultUninstall@[email protected]] 68 DelService = VBoxUSB,0x00000200 69 DelReg = VBoxUSB_Registry 65 70 66 [VBoxUSB .AddService]67 DisplayName = %VBoxUSB .SvcDesc%68 ServiceType = 1 ; SERVICE_KERNEL_DRIVER69 StartType = 3 ; SERVICE_DEMAND_START70 ErrorControl = 1 ; SERVICE_ERROR_NORMAL71 [VBoxUSB_Service] 72 DisplayName = %VBoxUSB_SvcDesc% 73 ServiceType = %SERVICE_TYPE_KERNEL_DRIVER% 74 StartType = %SERVICE_STARTTYPE_DEMAND% 75 ErrorControl = %SERVICE_ERRORCTL_NORMAL% 71 76 ServiceBinary = %10%\System32\Drivers\VBoxUSB.sys 72 AddReg = VBoxUSB.AddReg73 77 LoadOrderGroup = Base 74 78 75 [VBoxUSB.AddReg] 79 [VBoxUSB_AddReg] 80 AddReg = VBoxUSB_Registry 81 82 [VBoxUSB_Registry] 76 83 HKR,,DevLoader,,*ntkern 77 84 HKR,,NTMPDriver,,VBoxUSB.sys 78 85 79 [VBoxUSB .Files.Ext]86 [VBoxUSB_CopyFiles] 80 87 VBoxUSB.sys 81 82 ;---------------------------------------------------------------;83 88 84 89 [Strings] 85 90 ORACLE="Oracle Corporation" 86 Disk_Description="VBoxUSB Installation Disk" 87 USB\VID_80EE&PID_CAFE.DeviceDesc="VirtualBox USB" 88 VBoxUSB.SvcDesc="VirtualBox USB" 91 VBoxUSB_SvcDesc="VirtualBox USB Service" 92 VBoxUSB_DrvDesc="VirtualBox USB Driver" 93 VBoxUSB_DiskDesc="VBoxUSB Installation Disk" 94 95 ; Useful constants 96 SERVICE_TYPE_KERNEL_DRIVER = 1 97 SERVICE_STARTTYPE_BOOT = 0 98 SERVICE_STARTTYPE_DEMAND = 3 99 SERVICE_ERRORCTL_IGNORE = 0 100 SERVICE_ERRORCTL_NORMAL = 1 101 -
trunk/src/VBox/HostDrivers/VBoxUSB/win/mon/VBoxUSBMon.inf
r106061 r106321 43 43 DriverPackageType=KernelService 44 44 ;cat CatalogFile=VBoxUSBMon.cat 45 ;PnpLockdown=1 45 46 46 47 [DestinationDirs] 47 48 DefaultDestDir = 12 48 49 49 [ DefaultInstall@DOT-NT-ARCH@]50 CopyFiles=VBoxUSBMon_CopyFiles 50 [Manufacturer] 51 %ORACLE%=VBoxUSBMon@COMMA-NT-ARCH@ 51 52 52 [DefaultInstall@[email protected]] 53 [VBoxUSBMon@DOT-NT-ARCH@] 54 %VBoxUSBMon_DrvDesc%=VBoxUSBMonDev 55 56 [VBoxUSBMon@[email protected]] 53 57 AddService=VBoxUSBMon,0x00000002,VBoxUSBMon_Service,VBoxUSBMon_AddEventLog 54 58 55 ;; Cannot get this to work (same works fine for VBoxDrv): 56 ;; [Manufacturer] 57 ;; %ORACLE%=VBoxUSBMon@COMMA-NT-ARCH@ 58 ;; 59 ;; ; Models section (referenced by [Manufacturer]). 60 ;; [VBoxUSBMon@DOT-NT-ARCH@] 61 ;; %VBoxUSBMon.DRVDESC%=VBoxUSBMon_Install,root\VBoxUSBMon 62 ;; 63 ;; [VBoxUSBMon_Install@DOT-NT-ARCH@] 64 ;; CopyFiles=VBoxUSBMon_CopyFiles 65 ;; 66 ;; [VBoxUSBMon_Install@[email protected]] 67 ;; AddService=VBoxUSBMon,0x00000002,VBoxUSBMon_Service,VBoxUSBMon_AddEventLog 59 [VBoxUSBMonDev@DOT-NT-ARCH@] 60 CopyFiles=VBoxUSBMon_CopyFiles 68 61 69 62 [SourceDisksFiles] … … 71 64 72 65 [SourceDisksNames] 73 1=%VBoxUSBMon .DSKDESC%,66 1=%VBoxUSBMon_DiskDesc%, 74 67 75 68 [VBoxUSBMon_CopyFiles] … … 77 70 78 71 [VBoxUSBMon_Service] 79 DisplayName = %VBoxUSBMon.SVCDESC% 80 ServiceType = 1 ; SERVICE_KERNEL_DRIVER 81 ;StartType = 3 ; SERVICE_DEMAND_START 82 StartType = 1 ; autostart to fix Vista problem 83 ErrorControl = 1 ; SERVICE_ERROR_NORMAL 72 DisplayName = %VBoxUSBMon_SvcDesc% 73 ServiceType = %SERVICE_TYPE_KERNEL_DRIVER% 74 StartType = %SERVICE_STARTTYPE_AUTO% 75 ErrorControl = %SERVICE_ERRORCTL_NORMAL% 84 76 ServiceBinary = %12%\VBoxUSBMon.sys 85 77 … … 93 85 [Strings] 94 86 ORACLE = "Oracle Corporation" 95 VBoxUSBMon .SVCDESC= "VirtualBox USB Monitor Service"96 VBoxUSBMon .DRVDESC= "VirtualBox USB Monitor Driver"97 VBoxUSBMon .DSKDESC= "VirtualBox USB Monitor Driver Installation Disk"87 VBoxUSBMon_SvcDesc = "VirtualBox USB Monitor Service" 88 VBoxUSBMon_DrvDesc = "VirtualBox USB Monitor Driver" 89 VBoxUSBMon_DiskDesc = "VirtualBox USB Monitor Driver Installation Disk" 98 90 91 ; Useful constants 92 SERVICE_TYPE_KERNEL_DRIVER = 1 93 SERVICE_STARTTYPE_BOOT = 0 94 SERVICE_STARTTYPE_AUTO = 1 95 SERVICE_STARTTYPE_DEMAND = 3 96 SERVICE_ERRORCTL_IGNORE = 0 97 SERVICE_ERRORCTL_NORMAL = 1 98 -
trunk/src/VBox/Installer/win/InstallHelper/Makefile.kmk
r106061 r106321 50 50 VBoxInstallHelper.def \ 51 51 VBoxInstallHelper.rc \ 52 VBoxCommon.cpp 52 VBoxCommon.cpp \ 53 $(PATH_ROOT)/src/VBox/GuestHost/Installation/VBoxWinDrvCommon.cpp \ 54 $(PATH_ROOT)/src/VBox/GuestHost/Installation/VBoxWinDrvInst.cpp \ 55 $(PATH_ROOT)/src/VBox/GuestHost/Installation/VBoxWinDrvStore.cpp 53 56 ifndef VBOX_OSE 54 57 VBoxInstallHelper_SOURCES += \ -
trunk/src/VBox/Installer/win/InstallHelper/VBoxCommon.cpp
r106061 r106321 42 42 43 43 44 /** 45 * Retrieves a MSI property (in UTF-16), extended version. 46 * 47 * @returns VBox status code. 48 * @param hMsi MSI handle to use. 49 * @param pwszName Name of property to retrieve. 50 * @param pwszVal Where to store the allocated value on success. 51 * @param pcwVal Input and output size (in WCHARs) of \a pwszVal. 52 */ 53 int VBoxMsiQueryPropEx(MSIHANDLE hMsi, const WCHAR *pwszName, WCHAR *pwszVal, DWORD *pcwVal) 54 { 55 AssertPtrReturn(pwszName, VERR_INVALID_POINTER); 56 AssertPtrReturn(pwszVal, VERR_INVALID_POINTER); 57 AssertPtrReturn(pcwVal, VERR_INVALID_POINTER); 58 AssertReturn(*pcwVal, VERR_INVALID_PARAMETER); 59 60 int rc; 61 62 RT_BZERO(pwszVal, *pcwVal * sizeof(WCHAR)); 63 UINT uRc = MsiGetPropertyW(hMsi, pwszName, pwszVal, pcwVal); 64 if (uRc == ERROR_SUCCESS) 65 { 66 if (*pcwVal > 0) 67 { 68 rc = VINF_SUCCESS; 69 } 70 else /* Indicates value not found. */ 71 rc = VERR_NOT_FOUND; 72 } 73 else 74 rc = RTErrConvertFromWin32(uRc); 75 76 return rc; 77 } 78 44 79 #ifndef TESTCASE 45 80 /** 46 81 * Retrieves a MSI property (in UTF-16). 47 82 * 48 * Convenience function for VBoxGetMsiProp().49 *50 83 * @returns VBox status code. 51 84 * @param hMsi MSI handle to use. 52 85 * @param pwszName Name of property to retrieve. 53 * @param pwszVal ueBufWhere to store the allocated value on success.54 * @param cw cValueBuf Size (in WCHARs) of \a pwszValueBuf.86 * @param pwszVal Where to store the allocated value on success. 87 * @param cwVal Input size (in WCHARs) of \a pwszVal. 55 88 */ 56 UINT VBoxGetMsiProp(MSIHANDLE hMsi, const WCHAR *pwszName, WCHAR *pwszValueBuf, DWORD cwcValueBuf)89 int VBoxMsiQueryProp(MSIHANDLE hMsi, const WCHAR *pwszName, WCHAR *pwszVal, DWORD cwVal) 57 90 { 58 RT_BZERO(pwszValueBuf, cwcValueBuf * sizeof(WCHAR)); 59 return MsiGetPropertyW(hMsi, pwszName, pwszValueBuf, &cwcValueBuf); 91 return VBoxMsiQueryPropEx(hMsi, pwszName, pwszVal, &cwVal); 60 92 } 61 #endif 93 #endif /* !TESTCASE */ 62 94 63 95 /** … … 68 100 * @returns VBox status code. 69 101 * @param hMsi MSI handle to use. 70 * @param p cszNameName of property to retrieve.102 * @param pszName Name of property to retrieve. 71 103 * @param ppszValue Where to store the allocated value on success. 72 104 * Must be free'd using RTStrFree() by the caller. 73 105 */ 74 int VBox GetMsiPropUtf8(MSIHANDLE hMsi, const char *pcszName, char **ppszValue)106 int VBoxMsiQueryPropUtf8(MSIHANDLE hMsi, const char *pszName, char **ppszValue) 75 107 { 108 AssertPtrReturn(pszName, VERR_INVALID_POINTER); 109 AssertPtrReturn(ppszValue, VERR_INVALID_POINTER); 110 76 111 PRTUTF16 pwszName; 77 int rc = RTStrToUtf16(p cszName, &pwszName);112 int rc = RTStrToUtf16(pszName, &pwszName); 78 113 if (RT_SUCCESS(rc)) 79 114 { 80 115 WCHAR wszValue[1024]; /* 1024 should be enough for everybody (tm). */ 81 if (VBoxGetMsiProp(hMsi, pwszName, wszValue, RT_ELEMENTS(wszValue)) == ERROR_SUCCESS) 116 rc = VBoxMsiQueryProp(hMsi, pwszName, wszValue, RT_ELEMENTS(wszValue)); 117 if (RT_SUCCESS(rc)) 82 118 rc = RTUtf16ToUtf8(wszValue, ppszValue); 83 else84 rc = VERR_NOT_FOUND;85 119 86 120 RTUtf16Free(pwszName); … … 91 125 92 126 #ifndef TESTCASE 93 UINT VBoxSetMsiProp(MSIHANDLE hMsi, const WCHAR *pwszName, const WCHAR *pwszValue) 127 int VBoxMsiQueryPropInt32(MSIHANDLE hMsi, const char *pszName, DWORD *pdwValue) 128 { 129 AssertPtrReturn(pszName, VERR_INVALID_POINTER); 130 AssertPtrReturn(pdwValue, VERR_INVALID_POINTER); 131 132 PRTUTF16 pwszName; 133 int rc = RTStrToUtf16(pszName, &pwszName); 134 if (RT_SUCCESS(rc)) 135 { 136 char *pszTemp; 137 rc = VBoxMsiQueryPropUtf8(hMsi, pszName, &pszTemp); 138 if (RT_SUCCESS(rc)) 139 { 140 *pdwValue = RTStrToInt32(pszTemp); 141 RTStrFree(pszTemp); 142 } 143 } 144 145 return rc; 146 } 147 148 UINT VBoxMsiSetProp(MSIHANDLE hMsi, const WCHAR *pwszName, const WCHAR *pwszValue) 94 149 { 95 150 return MsiSetPropertyW(hMsi, pwszName, pwszValue); … … 97 152 #endif 98 153 99 UINT VBox SetMsiPropDWORD(MSIHANDLE hMsi, const WCHAR *pwszName, DWORD dwVal)154 UINT VBoxMsiSetPropDWORD(MSIHANDLE hMsi, const WCHAR *pwszName, DWORD dwVal) 100 155 { 101 156 wchar_t wszTemp[32]; 102 157 RTUtf16Printf(wszTemp, RT_ELEMENTS(wszTemp), "%u", dwVal); 103 return VBox SetMsiProp(hMsi, pwszName, wszTemp);158 return VBoxMsiSetProp(hMsi, pwszName, wszTemp); 104 159 } 105 160 -
trunk/src/VBox/Installer/win/InstallHelper/VBoxCommon.h
r106061 r106321 36 36 #endif 37 37 38 UINT VBoxGetMsiProp(MSIHANDLE hMsi, const WCHAR *pwszName, WCHAR *pwszValueBuf, DWORD cwcValueBuf); 39 int VBoxGetMsiPropUtf8(MSIHANDLE hMsi, const char *pcszName, char **ppszValue); 40 UINT VBoxSetMsiProp(MSIHANDLE hMsi, const WCHAR *pwszName, const WCHAR *pwszValue); 41 UINT VBoxSetMsiPropDWORD(MSIHANDLE hMsi, const WCHAR *pwszName, DWORD dwVal); 38 int VBoxMsiQueryProp(MSIHANDLE hMsi, const WCHAR *pwszName, WCHAR *pwszVal, DWORD cwVal); 39 int VBoxMsiQueryPropEx(MSIHANDLE hMsi, const WCHAR *pwszName, WCHAR *pwszVal, DWORD *pcwVal); 40 int VBoxMsiQueryPropUtf8(MSIHANDLE hMsi, const char *pszName, char **ppszValue); 41 int VBoxMsiQueryPropInt32(MSIHANDLE hMsi, const char *pszName, DWORD *pdwValue); 42 UINT VBoxMsiSetProp(MSIHANDLE hMsi, const WCHAR *pwszName, const WCHAR *pwszValue); 43 UINT VBoxMsiSetPropDWORD(MSIHANDLE hMsi, const WCHAR *pwszName, DWORD dwVal); 42 44 43 45 #endif /* !VBOX_INCLUDED_SRC_InstallHelper_VBoxCommon_h */ -
trunk/src/VBox/Installer/win/InstallHelper/VBoxInstallHelper.cpp
r106061 r106321 60 60 #include <iprt/err.h> 61 61 #include <iprt/file.h> 62 #include <iprt/initterm.h> 62 63 #include <iprt/mem.h> 63 64 #include <iprt/path.h> /* RTPATH_MAX, RTPATH_IS_SLASH */ … … 66 67 #include <iprt/thread.h> 67 68 #include <iprt/utf16.h> 69 70 #include <VBox/GuestHost/VBoxWinDrvInst.h> 68 71 69 72 #include "VBoxCommon.h" … … 134 137 BOOL WINAPI DllMain(HANDLE hInst, ULONG uReason, LPVOID pReserved) 135 138 { 136 RT_NOREF(hInst, uReason,pReserved);139 RT_NOREF(hInst, pReserved); 137 140 138 141 #ifdef DEBUG … … 147 150 case DLL_PROCESS_ATTACH: 148 151 { 152 int rc = RTR3InitDll(RTR3INIT_FLAGS_UNOBTRUSIVE); 153 if (RT_FAILURE(rc)) 154 return FALSE; 155 149 156 g_cRef++; 150 157 #if 0 … … 157 164 * and 2-3 times during uninstall. 158 165 * 159 * Note! The DIFxApp.DLL will automatically trigger breakpoints when a160 * debugger is attached. Just continue on these.161 166 */ 162 167 RTUtf16Printf(wszMsg, RT_ELEMENTS(wszMsg), "Waiting for debugger to attach: windbg -g -G -p %u\n", GetCurrentProcessId()); … … 174 179 case DLL_PROCESS_DETACH: 175 180 { 181 /** @todo RTR3Term(); */ 182 176 183 g_cRef--; 177 184 break; … … 649 656 char *pszTargetDir; 650 657 651 int vrc = VBoxGetMsiPropUtf8(hModule, "INSTALLDIR", &pszTargetDir); 652 if (RT_SUCCESS(vrc)) 658 int vrc = VBoxMsiQueryPropUtf8(hModule, "INSTALLDIR", &pszTargetDir); 659 if (vrc == VERR_NOT_FOUND) /* Target directory might not set yet. */ 660 { 661 logStringF(hModule, "CheckTargetDir: No INSTALLDIR set (yet), skipping ..."); 662 663 VBoxMsiSetProp(hModule, L"VBox_Target_Dir_Is_Valid", L"1"); 664 vrc = VINF_SUCCESS; 665 } 666 else if (RT_SUCCESS(vrc)) 653 667 { 654 668 logStringF(hModule, "CheckTargetDir: Checking target directory '%s' ...", pszTargetDir); 655 669 656 if (!RTStrNLen(pszTargetDir, RTPATH_MAX)) 657 { 658 logStringF(hModule, "CheckTargetDir: No INSTALLDIR set (yet), skipping ..."); 659 VBoxSetMsiProp(hModule, L"VBox_Target_Dir_Is_Valid", L"1"); 660 } 661 else 662 { 663 union 664 { 665 RTPATHPARSED Parsed; 666 uint8_t ab[RTPATH_MAX]; 667 } u; 668 669 vrc = RTPathParse(pszTargetDir, &u.Parsed, sizeof(u), RTPATH_STR_F_STYLE_DOS); 670 union 671 { 672 RTPATHPARSED Parsed; 673 uint8_t ab[RTPATH_MAX]; 674 } u; 675 676 vrc = RTPathParse(pszTargetDir, &u.Parsed, sizeof(u), RTPATH_STR_F_STYLE_DOS); 677 if (RT_SUCCESS(vrc)) 678 { 679 if (u.Parsed.fProps & RTPATH_PROP_DOTDOT_REFS) 680 vrc = VERR_INVALID_PARAMETER; 670 681 if (RT_SUCCESS(vrc)) 671 682 { 672 if (u.Parsed.fProps & RTPATH_PROP_DOTDOT_REFS) 673 vrc = VERR_INVALID_PARAMETER; 683 vrc = initTargetDirSecurityCtx(&g_TargetDirSecCtx, hModule, pszTargetDir); 674 684 if (RT_SUCCESS(vrc)) 675 685 { 676 vrc = initTargetDirSecurityCtx(&g_TargetDirSecCtx, hModule, pszTargetDir); 677 if (RT_SUCCESS(vrc)) 686 uint16_t idxComp = u.Parsed.cComps; 687 char szPathToCheck[RTPATH_MAX]; 688 while (idxComp > 1) /* We traverse backwards from INSTALLDIR and leave out the root (e.g. C:\"). */ 678 689 { 679 uint16_t idxComp = u.Parsed.cComps; 680 char szPathToCheck[RTPATH_MAX]; 681 while (idxComp > 1) /* We traverse backwards from INSTALLDIR and leave out the root (e.g. C:\"). */ 690 u.Parsed.cComps = idxComp; 691 vrc = RTPathParsedReassemble(pszTargetDir, &u.Parsed, RTPATH_STR_F_STYLE_DOS, 692 szPathToCheck, sizeof(szPathToCheck)); 693 if (RT_FAILURE(vrc)) 694 break; 695 if (RTDirExists(szPathToCheck)) 682 696 { 683 u.Parsed.cComps = idxComp; 684 vrc = RTPathParsedReassemble(pszTargetDir, &u.Parsed, RTPATH_STR_F_STYLE_DOS, 685 szPathToCheck, sizeof(szPathToCheck)); 697 vrc = checkTargetDirOne(hModule, &g_TargetDirSecCtx, szPathToCheck); 686 698 if (RT_FAILURE(vrc)) 687 699 break; 688 if (RTDirExists(szPathToCheck))689 {690 vrc = checkTargetDirOne(hModule, &g_TargetDirSecCtx, szPathToCheck);691 if (RT_FAILURE(vrc))692 break;693 }694 else695 logStringF(hModule, "CheckTargetDir: Path '%s' does not exist (yet)", szPathToCheck);696 idxComp--;697 700 } 698 699 destroyTargetDirSecurityCtx(&g_TargetDirSecCtx); 701 else 702 logStringF(hModule, "CheckTargetDir: Path '%s' does not exist (yet)", szPathToCheck); 703 idxComp--; 700 704 } 701 else 702 logStringF(hModule, "CheckTargetDir: initTargetDirSecurityCtx failed with %Rrc\n", vrc); 703 704 if (RT_SUCCESS(vrc)) 705 VBoxSetMsiProp(hModule, L"VBox_Target_Dir_Is_Valid", L"1"); 705 706 destroyTargetDirSecurityCtx(&g_TargetDirSecCtx); 706 707 } 707 } 708 else 709 logStringF(hModule, "CheckTargetDir: Parsing path failed with %Rrc", vrc); 710 } 708 else 709 logStringF(hModule, "CheckTargetDir: initTargetDirSecurityCtx failed with %Rrc\n", vrc); 710 711 if (RT_SUCCESS(vrc)) 712 VBoxMsiSetProp(hModule, L"VBox_Target_Dir_Is_Valid", L"1"); 713 } 714 } 715 else 716 logStringF(hModule, "CheckTargetDir: Parsing path failed with %Rrc", vrc); 711 717 712 718 RTStrFree(pszTargetDir); … … 716 722 { 717 723 logStringF(hModule, "CheckTargetDir: Checking failed with %Rrc", vrc); 718 VBox SetMsiProp(hModule, L"VBox_Target_Dir_Is_Valid", L"0");724 VBoxMsiSetProp(hModule, L"VBox_Target_Dir_Is_Valid", L"0"); 719 725 } 720 726 … … 988 994 { 989 995 logStringF(hModule, "IsPythonInstalled: Python installation found at \"%ls\"", wszPythonPath); 990 VBox SetMsiProp(hModule, L"VBOX_PYTHON_PATH", wszPythonPath);991 VBox SetMsiProp(hModule, L"VBOX_PYTHON_INSTALLED", L"1");996 VBoxMsiSetProp(hModule, L"VBOX_PYTHON_PATH", wszPythonPath); 997 VBoxMsiSetProp(hModule, L"VBOX_PYTHON_INSTALLED", L"1"); 992 998 } 993 999 else … … 995 1001 logStringF(hModule, "IsPythonInstalled: Error: No suitable Python installation found (%u), skipping installation.", rcWin); 996 1002 logStringF(hModule, "IsPythonInstalled: Python seems not to be installed; please download + install the Python Core package."); 997 VBox SetMsiProp(hModule, L"VBOX_PYTHON_INSTALLED", L"0");1003 VBoxMsiSetProp(hModule, L"VBOX_PYTHON_INSTALLED", L"0"); 998 1004 } 999 1005 … … 1025 1031 logStringF(hModule, "ArePythonAPIDepsInstalled: Failed with dwErr=%u", dwErr); 1026 1032 1027 VBox SetMsiProp(hModule, L"VBOX_PYTHON_DEPS_INSTALLED", dwErr == ERROR_SUCCESS ? L"1" : L"0");1033 VBoxMsiSetProp(hModule, L"VBOX_PYTHON_DEPS_INSTALLED", dwErr == ERROR_SUCCESS ? L"1" : L"0"); 1028 1034 return ERROR_SUCCESS; /* Never return failure. */ 1029 1035 } … … 1064 1070 if (lrc == ERROR_SUCCESS) 1065 1071 { 1066 VBox SetMsiPropDWORD(hModule, L"VBOX_MSCRT_VER_MAJ", dwMaj);1072 VBoxMsiSetPropDWORD(hModule, L"VBOX_MSCRT_VER_MAJ", dwMaj); 1067 1073 1068 1074 DWORD dwMin = 0; … … 1070 1076 if (lrc == ERROR_SUCCESS) 1071 1077 { 1072 VBox SetMsiPropDWORD(hModule, L"VBOX_MSCRT_VER_MIN", dwMin);1078 VBoxMsiSetPropDWORD(hModule, L"VBOX_MSCRT_VER_MIN", dwMin); 1073 1079 1074 1080 logStringF(hModule, "IsMSCRTInstalled: Found v%u.%u\n", dwMaj, dwMin); … … 1076 1082 /* Check for at least 2019. */ 1077 1083 if (dwMaj > 14 || (dwMaj == 14 && dwMin >= 20)) 1078 VBox SetMsiProp(hModule, L"VBOX_MSCRT_INSTALLED", L"1");1084 VBoxMsiSetProp(hModule, L"VBOX_MSCRT_INSTALLED", L"1"); 1079 1085 } 1080 1086 else … … 1129 1135 logStringF(hModule, "IsWindows10/CurrentMajorVersionNumber: %u", dwVal); 1130 1136 1131 VBox SetMsiProp(hModule, L"VBOX_IS_WINDOWS_10", dwVal >= 10 ? L"1" : L"");1137 VBoxMsiSetProp(hModule, L"VBOX_IS_WINDOWS_10", dwVal >= 10 ? L"1" : L""); 1132 1138 } 1133 1139 else … … 1161 1167 if (rcWin != ERROR_SUCCESS) 1162 1168 { 1163 VBox SetMsiProp(hModule, L"VBOX_API_INSTALLED", L"0");1169 VBoxMsiSetProp(hModule, L"VBOX_API_INSTALLED", L"0"); 1164 1170 return ERROR_SUCCESS; 1165 1171 } … … 1170 1176 /* Get the VBox API setup string. */ 1171 1177 WCHAR wszVBoxPythonInstallerPath[RTPATH_MAX]; 1172 rcWin = VBoxGetMsiProp(hModule, L"CustomActionData", wszVBoxPythonInstallerPath, RT_ELEMENTS(wszVBoxPythonInstallerPath));1173 if ( rcWin == ERROR_SUCCESS)1178 int rc = VBoxMsiQueryProp(hModule, L"CustomActionData", wszVBoxPythonInstallerPath, RT_ELEMENTS(wszVBoxPythonInstallerPath)); 1179 if (RT_SUCCESS(rc)) 1174 1180 { 1175 1181 /* Make sure our current working directory is the VBox installation path. */ … … 1199 1205 { 1200 1206 logStringF(hModule, "InstallPythonAPI: VBox API looks good."); 1201 VBox SetMsiProp(hModule, L"VBOX_API_INSTALLED", L"1");1207 VBoxMsiSetProp(hModule, L"VBOX_API_INSTALLED", L"1"); 1202 1208 return ERROR_SUCCESS; 1203 1209 } … … 1218 1224 } 1219 1225 else 1220 logStringF(hModule, "InstallPythonAPI: Unable to retrieve VBox installation directory: rc Win=%u (%#x)", rcWin, rcWin);1221 1222 VBox SetMsiProp(hModule, L"VBOX_API_INSTALLED", L"0");1226 logStringF(hModule, "InstallPythonAPI: Unable to retrieve VBox installation directory: rc=%Rrc", rc); 1227 1228 VBoxMsiSetProp(hModule, L"VBOX_API_INSTALLED", L"0"); 1223 1229 logStringF(hModule, "InstallPythonAPI: Installation failed"); 1224 1230 return ERROR_SUCCESS; /* Do not fail here. */ … … 1373 1379 1374 1380 WCHAR wszPath[RTPATH_MAX]; 1375 UINT rc = VBoxGetMsiProp(hModule, L"CustomActionData", wszPath, RT_ELEMENTS(wszPath));1376 if ( rc == ERROR_SUCCESS)1381 int rc = VBoxMsiQueryProp(hModule, L"CustomActionData", wszPath, RT_ELEMENTS(wszPath)); 1382 if (RT_SUCCESS(rc)) 1377 1383 { 1378 1384 size_t const cwcPath = RTUtf16Len(wszPath); … … 1388 1394 } 1389 1395 1390 logStringF(hModule, "UninstallBranding: Handling done. (rc=% u(ignored))", rc);1396 logStringF(hModule, "UninstallBranding: Handling done. (rc=%Rrc (ignored))", rc); 1391 1397 return ERROR_SUCCESS; /* Do not fail here. */ 1392 1398 } … … 1400 1406 */ 1401 1407 wchar_t wszSrcPath[RTPATH_MAX]; 1402 UINT rc = VBoxGetMsiProp(hModule, L"SOURCEDIR", wszSrcPath, RT_ELEMENTS(wszSrcPath));1403 if ( rc == ERROR_SUCCESS)1408 int rc = VBoxMsiQueryProp(hModule, L"SOURCEDIR", wszSrcPath, RT_ELEMENTS(wszSrcPath)); 1409 if (RT_SUCCESS(rc)) 1404 1410 { 1405 1411 wchar_t wszDstPath[RTPATH_MAX]; 1406 rc = VBox GetMsiProp(hModule, L"CustomActionData", wszDstPath, RT_ELEMENTS(wszDstPath) - 1);1407 if ( rc == ERROR_SUCCESS)1412 rc = VBoxMsiQueryProp(hModule, L"CustomActionData", wszDstPath, RT_ELEMENTS(wszDstPath)); 1413 if (RT_SUCCESS(rc)) 1408 1414 { 1409 1415 /* 1410 1416 * First we copy the src\.custom dir to the target. 1411 1417 */ 1412 rc= AppendToPath(wszSrcPath, RT_ELEMENTS(wszSrcPath) - 1, L".custom", true /*fDoubleTerm*/);1413 if (rc == ERROR_SUCCESS)1414 { 1415 rc = CopyDir(hModule, wszDstPath, wszSrcPath);1416 if (rc == ERROR_SUCCESS)1418 UINT rcWin = AppendToPath(wszSrcPath, RT_ELEMENTS(wszSrcPath) - 1, L".custom", true /*fDoubleTerm*/); 1419 if (rcWin == ERROR_SUCCESS) 1420 { 1421 rcWin = CopyDir(hModule, wszDstPath, wszSrcPath); 1422 if (rcWin == ERROR_SUCCESS) 1417 1423 { 1418 1424 /* 1419 1425 * The rename the '.custom' directory we now got in the target area to 'custom'. 1420 1426 */ 1421 rc = JoinPaths(wszSrcPath, RT_ELEMENTS(wszSrcPath), wszDstPath, L".custom", true /*fDoubleTerm*/);1427 rcWin = JoinPaths(wszSrcPath, RT_ELEMENTS(wszSrcPath), wszDstPath, L".custom", true /*fDoubleTerm*/); 1422 1428 if (rc == ERROR_SUCCESS) 1423 1429 { 1424 rc = AppendToPath(wszDstPath, RT_ELEMENTS(wszDstPath), L"custom", true /*fDoubleTerm*/);1430 rcWin = AppendToPath(wszDstPath, RT_ELEMENTS(wszDstPath), L"custom", true /*fDoubleTerm*/); 1425 1431 if (rc == ERROR_SUCCESS) 1426 rc = RenameDir(hModule, wszDstPath, wszSrcPath);1432 rcWin = RenameDir(hModule, wszDstPath, wszSrcPath); 1427 1433 } 1428 1434 } 1429 1435 } 1430 } 1431 } 1432 1433 logStringF(hModule, "InstallBranding: Handling done. (rc=%u (ignored))", rc); 1436 1437 logStringF(hModule, "InstallBranding: Handling done. (rc=%Rrc (ignored))", rc); 1438 } 1439 } 1440 1441 logStringF(hModule, "InstallBranding: Handling done. (rc=%Rrc (ignored))", rc); 1442 return ERROR_SUCCESS; /* Do not fail here. */ 1443 } 1444 1445 static DECLCALLBACK(void) vboxWinDrvInstLogCallback(VBOXWINDRIVERLOGTYPE enmType, const char *pszMsg, void *pvUser) 1446 { 1447 MSIHANDLE *phModule = (MSIHANDLE *)pvUser; 1448 1449 switch (enmType) 1450 { 1451 case VBOXWINDRIVERLOGTYPE_ERROR: 1452 logStringF(*phModule, "*** Error: %s", pszMsg); 1453 break; 1454 1455 default: 1456 logStringF(*phModule, "%s", pszMsg); 1457 break; 1458 } 1459 } 1460 1461 UINT __stdcall DriverInstall(MSIHANDLE hModule) 1462 { 1463 logStringF(hModule, "Installing driver ..."); 1464 1465 char *pszInfFile = NULL; 1466 int rc = VBoxMsiQueryPropUtf8(hModule, "VBoxDrvInstInfFile", &pszInfFile); 1467 if (RT_SUCCESS(rc)) 1468 { 1469 char *pszInfSection = NULL; 1470 rc = VBoxMsiQueryPropUtf8(hModule, "VBoxDrvInstInfSection", &pszInfSection); 1471 if ( RT_SUCCESS(rc) 1472 || rc == VERR_NOT_FOUND) /* VBoxDrvInstInfSection is optional. */ 1473 { 1474 char *pszPnpId = NULL; 1475 rc = VBoxMsiQueryPropUtf8(hModule, "VBoxDrvInstPnpId", &pszPnpId); 1476 if ( RT_SUCCESS(rc) 1477 || rc == VERR_NOT_FOUND) /* VBoxDrvInstHwId is optional. */ 1478 { 1479 uint32_t fFlags = VBOX_WIN_DRIVERINSTALL_F_NONE; 1480 1481 DWORD dwVal; 1482 rc = VBoxMsiQueryPropInt32(hModule, "VBoxDrvInstFlagForce", &dwVal); 1483 if (RT_SUCCESS(rc)) 1484 fFlags |= VBOX_WIN_DRIVERINSTALL_F_FORCE; 1485 rc = VBoxMsiQueryPropInt32(hModule, "VBoxDrvInstFlagSilent", &dwVal); 1486 if (RT_SUCCESS(rc)) 1487 fFlags |= VBOX_WIN_DRIVERINSTALL_F_SILENT; 1488 1489 VBOXWINDRVINST hWinDrvInst; 1490 rc = VBoxWinDrvInstCreateEx(&hWinDrvInst, 1 /* uVerbostiy */, &vboxWinDrvInstLogCallback, &hModule /* pvUser */); 1491 if (RT_SUCCESS(rc)) 1492 { 1493 if (pszInfSection && *pszInfSection) 1494 rc = VBoxWinDrvInstInstallExecuteInf(hWinDrvInst, pszInfFile, pszInfSection, fFlags); 1495 else 1496 rc = VBoxWinDrvInstInstall(hWinDrvInst, pszInfFile, pszPnpId, fFlags); 1497 1498 VBoxWinDrvInstDestroy(hWinDrvInst); 1499 } 1500 1501 RTStrFree(pszPnpId); 1502 } 1503 1504 RTStrFree(pszInfSection); 1505 } 1506 1507 RTStrFree(pszInfFile); 1508 } 1509 else 1510 { 1511 logStringF(hModule, "DriverInstall: No INF or invalid file to install specified!"); 1512 if (rc == VERR_NOT_FOUND) /* Give a better clue. */ 1513 rc = VERR_INVALID_PARAMETER; 1514 } 1515 1516 logStringF(hModule, "DriverInstall: Handling done. rc=%Rrc (ignored)", rc); 1517 return ERROR_SUCCESS; /* Do not fail here. */ 1518 } 1519 1520 UINT __stdcall DriverUninstall(MSIHANDLE hModule) 1521 { 1522 char *pszInfFile = NULL; 1523 int rc = VBoxMsiQueryPropUtf8(hModule, "VBoxDrvUninstInfFile", &pszInfFile); 1524 if ( RT_SUCCESS(rc) 1525 || rc == VERR_NOT_FOUND) /* VBoxDrvUninstInfFile is optional. */ 1526 { 1527 char *pszInfSection = NULL; 1528 rc = VBoxMsiQueryPropUtf8(hModule, "VBoxDrvUninstInfSection", &pszInfSection); 1529 if ( RT_SUCCESS(rc) 1530 || rc == VERR_NOT_FOUND) /* VBoxDrvUninstInfSection is optional. */ 1531 { 1532 char *pszModel = NULL; 1533 rc = VBoxMsiQueryPropUtf8(hModule, "VBoxDrvUninstModel", &pszModel); 1534 if ( RT_SUCCESS(rc) 1535 || rc == VERR_NOT_FOUND) /* VBoxDrvUninstModel is optional. */ 1536 { 1537 char *pszPnpId = NULL; 1538 rc = VBoxMsiQueryPropUtf8(hModule, "VBoxDrvUninstPnpId", &pszPnpId); 1539 if ( RT_SUCCESS(rc) 1540 || rc == VERR_NOT_FOUND) /* VBoxDrvUninstPnpId is optional. */ 1541 { 1542 VBOXWINDRVINST hWinDrvInst; 1543 rc = VBoxWinDrvInstCreateEx(&hWinDrvInst, 1 /* uVerbostiy */, 1544 &vboxWinDrvInstLogCallback, &hModule /* pvUser */); 1545 if (RT_SUCCESS(rc)) 1546 { 1547 if (pszInfSection && *pszInfSection) 1548 rc = VBoxWinDrvInstUninstallExecuteInf(hWinDrvInst, pszInfFile, pszInfSection, 1549 VBOX_WIN_DRIVERINSTALL_F_NONE); 1550 else 1551 rc = VBoxWinDrvInstUninstall(hWinDrvInst, pszInfFile, pszModel, pszPnpId, 1552 VBOX_WIN_DRIVERINSTALL_F_NONE); 1553 1554 VBoxWinDrvInstDestroy(hWinDrvInst); 1555 } 1556 1557 RTStrFree(pszPnpId); 1558 } 1559 1560 RTStrFree(pszModel); 1561 } 1562 1563 RTStrFree(pszInfSection); 1564 } 1565 1566 RTStrFree(pszInfFile); 1567 } 1568 1569 logStringF(hModule, "DriverUninstall: Handling done. rc=%Rrc (ignored)", rc); 1434 1570 return ERROR_SUCCESS; /* Do not fail here. */ 1435 1571 } -
trunk/src/VBox/Installer/win/InstallHelper/VBoxInstallHelper.def
r106061 r106321 45 45 UninstallTAPInstances 46 46 UninstallVBoxDrv 47 DriverInstall 48 DriverUninstall 47 49 CreateHostOnlyInterface 48 50 StopHostOnlyInterfaces -
trunk/src/VBox/Installer/win/Makefile.kmk
r106061 r106321 75 75 VBOX_WITH_DOCS_PACKING := 76 76 VBOX_WITH_QTGUI := 77 VBOX_WITH_USB := 77 VBOX_WITH_USB := 1 78 78 VBOX_WITH_VBOX_IMG := 79 79 VBOX_WITH_VBOXSDL := … … 310 310 # 311 311 VBOX_TOOLS_WIN_WIX_EXT := \ 312 -lib $(VBOX_TOOLS_WIN_WIXEXT_DIR)/difxapp_$(if-expr "$(KBUILD_TARGET_ARCH)" == "x86",x86,x64).wixlib \313 312 $(if-expr defined(VBOX_WITH_MSI_HACK),-ext $(MsiHack_0_OUTDIR)/MsiHackExtension.dll,) \ 314 313 -ext $(VBOX_TOOLS_WIN_WIXEXT_DIR)/WixToolset.Ui.wixext.dll \ 315 -ext $(VBOX_TOOLS_WIN_WIXEXT_DIR)/WixToolset.DifxApp.wixext.dll \316 314 -ext $(VBOX_TOOLS_WIN_WIXEXT_DIR)/WixToolset.Util.wixext.dll 317 315 … … 578 576 -loc $(VBOX_WIN_INST_OUT_DIR)/NLS/License_$(lang).wxl \ 579 577 -lib $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_$(lang).wixlib \ 580 -ext $(VBOX_TOOLS_WIN_WIXEXT_DIR)/WixToolset.DifxApp.wixext.dll \581 578 -ext $(VBOX_TOOLS_WIN_WIXEXT_DIR)/WixToolset.Util.wixext.dll \ 582 579 -pdbtype none \ … … 596 593 ' files-VirtualBox_$(lang)/License_$(lang).wxl ^' \ 597 594 ' -lib VirtualBox_en_US.wixlib ^' \ 598 ' -ext $(VBOX_TOOLS_WIN_WIXEXT_DIR)/WixToolset.DifxApp.wixext.dll ^' \599 595 ' -ext $(VBOX_TOOLS_WIN_WIXEXT_DIR)/WixToolset.Util.wixext.dll ^' \ 600 596 ' -pdbtype none ^' \ … … 1059 1055 -lib $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_en_US.wixlib \ 1060 1056 -ext $(VBOX_TOOLS_WIN_WIXEXT_DIR)/WixToolset.Util.wixext.dll \ 1061 -ext $(VBOX_TOOLS_WIN_WIXEXT_DIR)/WixToolset.DifxApp.wixext.dll \1062 1057 -pdbtype none \ 1063 1058 -out $$(@D)/$(PACKAGE_NAME_LANG)_$(lang).msi -
trunk/src/VBox/Installer/win/Scripts/Combined-3-RepackAdditions.cmd
r106061 r106321 237 237 -E "PATH_TARGET_X86=%_MY_REPACK_DIR_X86%\resources" ^ 238 238 -E "VBOX_PATH_ADDITIONS_WIN_X86=%_MY_REPACK_DIR_AMD64%\..\bin\additions" ^ 239 -E "VBOX_PATH_DIFX=%KBUILD_DEVTOOLS%\win.amd64\DIFx\v2.1-r3" ^240 239 -E "VBOX_VENDOR=Oracle Corporation" -E "VBOX_VENDOR_SHORT=Oracle" -E "VBOX_PRODUCT=Oracle VirtualBox" ^ 241 240 -E "VBOX_C_YEAR=@VBOX_C_YEAR@" -E "VBOX_VERSION_STRING=@VBOX_VERSION_STRING@" -E "VBOX_VERSION_STRING_RAW=@VBOX_VERSION_STRING_RAW@" ^ … … 268 267 -E "PATH_TARGET_X86=%_MY_REPACK_DIR_X86%\resources" ^ 269 268 -E "VBOX_PATH_ADDITIONS_WIN_X86=%_MY_REPACK_DIR_X86%\..\bin\additions" ^ 270 -E "VBOX_PATH_DIFX=%KBUILD_DEVTOOLS%\win.x86\DIFx\v2.1-r3" ^271 269 -E "VBOX_VENDOR=Oracle Corporation" -E "VBOX_VENDOR_SHORT=Oracle" -E "VBOX_PRODUCT=Oracle VirtualBox" ^ 272 270 -E "VBOX_C_YEAR=@VBOX_C_YEAR@" -E "VBOX_VERSION_STRING=@VBOX_VERSION_STRING@" -E "VBOX_VERSION_STRING_RAW=@VBOX_VERSION_STRING_RAW@" ^ -
trunk/src/VBox/Installer/win/VBoxMergeApp.wxi
r106061 r106321 24 24 --> 25 25 26 <Include xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:difxapp="http://wixtoolset.org/schemas/v4/wxs/difxapp">26 <Include xmlns="http://wixtoolset.org/schemas/v4/wxs"> 27 27 28 28 <?ifdef env.VBOX_QT_INFIX ?> … … 51 51 <?if $(env.VBOX_SIGNING_MODE) != none ?> 52 52 <Component Id="cp_VBoxSupCat_PreW10" Guid="673195c2-f315-42e7-ff00-5acbd91ea0bd" Bitness="$(var.Property_Bitness)" Condition="(NOT VBOX_IS_WINDOWS_10)"> 53 54 53 <File Id="file_VBoxSup_PreW10.cat" Name="VBoxSup.cat" Source="$(env.PATH_OUT)\bin\VBoxSup-PreW10.cat" /> 55 54 </Component> 56 55 <Component Id="cp_VBoxSupCat_W10" Guid="589be90d-0286-4684-503d-a1681f9587bc" Bitness="$(var.Property_Bitness)" Condition="(VBOX_IS_WINDOWS_10)"> 57 58 56 <File Id="file_VBoxSup.cat" Name="VBoxSup.cat" Source="$(env.PATH_OUT)\bin\VBoxSup.cat" /> 59 57 </Component> 60 58 <?endif?> 61 59 <Component Id="cp_VBoxSup" Guid="D3E2F2BB-569F-46A2-836C-BDF30FF1EDF8" Bitness="$(var.Property_Bitness)"> 62 < difxapp:Driver AddRemovePrograms="no" ForceInstall="yes" DeleteFiles="yes" Legacy="$(var.Property_DriverLegacy)" Sequence="2" PlugAndPlayPrompt="no" />60 <!-- Note: Driver gets installed via custom action via VBoxInstallHelper. --> 63 61 <File Id="file_VBoxSup.sys" Name="VBoxSup.sys" KeyPath="yes" Source="$(env.PATH_OUT)\bin\VBoxSup.sys" /> 64 62 <File Id="file_VBoxSup.inf" Name="VBoxSup.inf" Source="$(env.PATH_OUT)\bin\VBoxSup.inf" /> -
trunk/src/VBox/Installer/win/VBoxMergeAppCA.wxi
r106061 r106321 26 26 <Include xmlns="http://wixtoolset.org/schemas/v4/wxs"> 27 27 28 <CustomAction Id="ca_VBoxSupDrvInst" DllEntry="DriverInstall" Execute="immediate" Return="ignore" Impersonate="no" BinaryRef="VBoxInstallHelper" /> 29 <CustomAction Id="ca_VBoxSupDrvInstArgInfFile" Property="VBoxDrvInstInfFile" Value="[#file_VBoxSup.inf]" Execute="immediate" /> 30 <CustomAction Id="ca_VBoxSupDrvInstArgModel" Property="VBoxDrvInstModel" Value="VBoxSup" Execute="immediate" /> 31 <CustomAction Id="ca_VBoxSupDrvInstArgFlagForce" Property="VBoxDrvInstFlagForce" Value="1" Execute="immediate" /> 32 <CustomAction Id="ca_VBoxSupDrvInstArgFlagSilent" Property="VBoxDrvInstFlagSilent" Value="1" Execute="immediate" /> 33 34 <CustomAction Id="ca_VBoxSupDrvUninst" DllEntry="DriverUninstall" Execute="immediate" Return="ignore" Impersonate="no" BinaryRef="VBoxInstallHelper" /> 35 <CustomAction Id="ca_VBoxSupDrvUninstArgModel" Property="VBoxDrvUninstModel" Value="VBoxSup*" Execute="immediate" /> 36 28 37 <?if $(env.VBOX_WITH_CRT_PACKING) = "no" ?> 29 38 <CustomAction Id="ca_IsMSCRTInstalled" DllEntry="IsMSCRTInstalled" Execute="immediate" Return="ignore" Impersonate="no" BinaryRef="VBoxInstallHelper" /> -
trunk/src/VBox/Installer/win/VBoxMergeAppSeq.wxi
r106061 r106321 26 26 <Include xmlns="http://wixtoolset.org/schemas/v4/wxs"> 27 27 28 <Custom Action="ca_VBoxSupDrvInstArgFlagSilent" Before="ca_VBoxSupDrvInstArgFlagForce" Condition="NOT REMOVE" /> 29 <Custom Action="ca_VBoxSupDrvInstArgFlagForce" Before="ca_VBoxSupDrvInstArgModel" Condition="NOT REMOVE" /> 30 <Custom Action="ca_VBoxSupDrvInstArgInfFile" Before="ca_VBoxSupDrvInstArgModel" Condition="NOT REMOVE" /> 31 <Custom Action="ca_VBoxSupDrvInstArgModel" Before="ca_VBoxSupDrvInst" Condition="NOT REMOVE" /> 32 <Custom Action="ca_VBoxSupDrvInst" After="InstallFinalize" Condition="NOT REMOVE" /> 33 34 <Custom Action="ca_VBoxSupDrvUninstArgModel" Before="ca_VBoxSupDrvUninst" 35 Condition="NOT (UPGRADINGPRODUCTCODE) AND (Installed) AND (REMOVE="ALL")" /> 36 <Custom Action="ca_VBoxSupDrvUninst" After="InstallInitialize" 37 Condition="NOT (UPGRADINGPRODUCTCODE) AND (Installed) AND (REMOVE="ALL")" /> 38 28 39 <?if $(env.VBOX_WITH_CRT_PACKING) = "no" ?> 29 40 <Custom Action="ca_IsMSCRTInstalled" Before="LaunchConditions"/> -
trunk/src/VBox/Installer/win/VBoxMergeUSB.wxi
r106061 r106321 24 24 --> 25 25 26 <Include xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:difxapp="http://wixtoolset.org/schemas/v4/wxs/difxapp">26 <Include xmlns="http://wixtoolset.org/schemas/v4/wxs"> 27 27 28 28 <Directory Id="dir_VBoxUSBFilter" Name="filter"> … … 38 38 <?endif?> 39 39 <Component Id="cp_USBFilterDriver" Guid="B7D782D2-96DF-4775-A0E1-A76CF7B04B65" Bitness="$(var.Property_Bitness)"> 40 <difxapp:Driver AddRemovePrograms="no" ForceInstall="yes" DeleteFiles="yes" Legacy="$(var.Property_DriverLegacy)" Sequence="3" PlugAndPlayPrompt="no" />41 40 <File Id="file_VBoxUSBMon.sys" Name="VBoxUSBMon.sys" Source="$(env.PATH_OUT)\bin\VBoxUSBMon.sys" /> 42 41 <File Id="file_VBoxUSBMon.inf" Name="VBoxUSBMon.inf" Source="$(env.PATH_OUT)\bin\VBoxUSBMon.inf" /> … … 56 55 <?endif?> 57 56 <Component Id="cp_USBDeviceDriver" Guid="010FE46A-E358-43E2-8BDC-38BC8BEC82E0" Bitness="$(var.Property_Bitness)"> 58 <difxapp:Driver AddRemovePrograms="no" ForceInstall="yes" DeleteFiles="yes" Legacy="$(var.Property_DriverLegacy)" Sequence="3" PlugAndPlayPrompt="no" />59 57 <File Id="file_VBoxUSB.sys" Name="VBoxUSB.sys" Source="$(env.PATH_OUT)\bin\VBoxUSB.sys" /> 60 58 <File Id="file_VBoxUSB.inf" Name="VBoxUSB.inf" Source="$(env.PATH_OUT)\bin\VBoxUSB.inf" /> -
trunk/src/VBox/Installer/win/VBoxMergeUSBCA.wxi
r106061 r106321 26 26 <Include xmlns="http://wixtoolset.org/schemas/v4/wxs"> 27 27 28 <CustomAction Id="ca_VBoxUSBDevDrvInst" DllEntry="DriverInstall" Execute="immediate" Return="ignore" Impersonate="no" BinaryRef="VBoxInstallHelper" /> 29 <CustomAction Id="ca_VBoxUSBDevDrvInstArgInfFile" Property="VBoxDrvInstInfFile" Value="[#file_VBoxUSB.inf]" Execute="immediate" /> 30 <CustomAction Id="ca_VBoxUSBDevDrvInstArgModel" Property="VBoxDrvInstModel" Value="VBoxUSB*" Execute="immediate" /> 31 <CustomAction Id="ca_VBoxUSBDevDrvInstArgFlagForce" Property="VBoxDrvInstFlagForce" Value="1" Execute="immediate" /> 32 <CustomAction Id="ca_VBoxUSBDevDrvInstArgFlagSilent" Property="VBoxDrvInstFlagSilent" Value="1" Execute="immediate" /> 33 34 <CustomAction Id="ca_VBoxUSBDevDrvUninst" DllEntry="DriverUninstall" Execute="immediate" Return="ignore" Impersonate="no" BinaryRef="VBoxInstallHelper" /> 35 <CustomAction Id="ca_VBoxUSBDevDrvUninstArgModel" Property="VBoxDrvUninstModel" Value="VBoxUSB*" Execute="immediate" /> 36 37 <CustomAction Id="ca_VBoxUSBMonDrvInst" DllEntry="DriverInstall" Execute="immediate" Return="ignore" Impersonate="no" BinaryRef="VBoxInstallHelper" /> 38 <CustomAction Id="ca_VBoxUSBMonDrvInstArgInfFile" Property="VBoxDrvInstInfFile" Value="[#file_VBoxUSBMon.inf]" Execute="immediate" /> 39 <CustomAction Id="ca_VBoxUSBMonDrvInstArgModel" Property="VBoxDrvInstModel" Value="VBoxUSBMon*" Execute="immediate" /> 40 <CustomAction Id="ca_VBoxUSBMonDrvInstArgFlagForce" Property="VBoxDrvInstFlagForce" Value="1" Execute="immediate" /> 41 <CustomAction Id="ca_VBoxUSBMonDrvInstArgFlagSilent" Property="VBoxDrvInstFlagSilent" Value="1" Execute="immediate" /> 42 43 <CustomAction Id="ca_VBoxUSBMonDrvUninst" DllEntry="DriverUninstall" Execute="immediate" Return="ignore" Impersonate="no" BinaryRef="VBoxInstallHelper" /> 44 <CustomAction Id="ca_VBoxUSBMonDrvUninstArgModel" Property="VBoxDrvUninstModel" Value="VBoxUSBMon*" Execute="immediate" /> 45 28 46 </Include> 47 -
trunk/src/VBox/Installer/win/VBoxMergeUSBSeq.wxi
r106061 r106321 26 26 <Include xmlns="http://wixtoolset.org/schemas/v4/wxs"> 27 27 28 <Custom Action="ca_VBoxUSBDevDrvInstArgFlagSilent" Before="ca_VBoxUSBDevDrvInstArgFlagForce" Condition="NOT REMOVE" /> 29 <Custom Action="ca_VBoxUSBDevDrvInstArgFlagForce" Before="ca_VBoxUSBDevDrvInstArgModel" Condition="NOT REMOVE" /> 30 <Custom Action="ca_VBoxUSBDevDrvInstArgModel" Before="ca_VBoxUSBDevDrvInstArgInfFile" Condition="NOT REMOVE" /> 31 <Custom Action="ca_VBoxUSBDevDrvInstArgInfFile" Before="ca_VBoxUSBDevDrvInst" Condition="NOT REMOVE" /> 32 <Custom Action="ca_VBoxUSBDevDrvInst" After="InstallFinalize" Condition="NOT REMOVE" /> 33 34 <Custom Action="ca_VBoxUSBDevDrvUninstArgModel" Before="ca_VBoxUSBDevDrvUninst" 35 Condition="NOT (UPGRADINGPRODUCTCODE) AND (Installed) AND (REMOVE="ALL")" /> 36 <Custom Action="ca_VBoxUSBDevDrvUninst" After="InstallInitialize" 37 Condition="NOT (UPGRADINGPRODUCTCODE) AND (Installed) AND (REMOVE="ALL")"/> 38 39 <Custom Action="ca_VBoxUSBMonDrvInstArgFlagSilent" Before="ca_VBoxUSBMonDrvInstArgFlagForce" Condition="NOT REMOVE" /> 40 <Custom Action="ca_VBoxUSBMonDrvInstArgFlagForce" Before="ca_VBoxUSBMonDrvInstArgModel" Condition="NOT REMOVE" /> 41 <Custom Action="ca_VBoxUSBMonDrvInstArgModel" Before="ca_VBoxUSBMonDrvInstArgInfFile" Condition="NOT REMOVE" /> 42 <Custom Action="ca_VBoxUSBMonDrvInstArgInfFile" Before="ca_VBoxUSBMonDrvInst" Condition="NOT REMOVE" /> 43 <Custom Action="ca_VBoxUSBMonDrvInst" After="InstallFinalize" Condition="NOT REMOVE" /> 44 45 <Custom Action="ca_VBoxUSBMonDrvUninstArgModel" Before="ca_VBoxUSBMonDrvUninst" 46 Condition="NOT (UPGRADINGPRODUCTCODE) AND (Installed) AND (REMOVE="ALL")" /> 47 <Custom Action="ca_VBoxUSBMonDrvUninst" After="InstallInitialize" 48 Condition="NOT (UPGRADINGPRODUCTCODE) AND (Installed) AND (REMOVE="ALL")" /> 49 28 50 </Include> 51 -
trunk/src/VBox/Runtime/win/RTErrConvertFromWin32.cpp
r106061 r106321 222 222 223 223 case ERROR_SERVICE_ALREADY_RUNNING: return VERR_ALREADY_LOADED; /* Not the best match, but seen it with VBoxSup.sys. */ 224 case ERROR_NOT_FOUND: return VERR_NOT_FOUND; 224 225 225 226 -
trunk/tools/bin/common-gen-workspace.inc.sh
r106061 r106321 338 338 fi 339 339 my_generate_project "ShClip-GH" "src/VBox/GuestHost/SharedClipboard" --begin-incs "include" --end-includes "src/VBox/GuestHost/SharedClipboard" 340 my_generate_project "Install-GH" "src/VBox/GuestHost/installation" --begin-incs "include" --end-includes "src/VBox/GuestHost/installation" 340 341 341 342 # src/VBox/HostDrivers
Note:
See TracChangeset
for help on using the changeset viewer.