Changeset 107059 in vbox
- Timestamp:
- Nov 20, 2024 1:50:22 PM (2 months ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/GuestHost/VBoxWinDrvInst.h
r106839 r107059 85 85 /** Force driver installation, even if a newer driver version already is installed (overwrite). */ 86 86 #define VBOX_WIN_DRIVERINSTALL_F_FORCE RT_BIT(1) 87 /** Run in dry mode (no real (un)installation performed). */ 88 #define VBOX_WIN_DRIVERINSTALL_F_DRYRUN RT_BIT(2) 87 89 /** Validation mask. */ 88 #define VBOX_WIN_DRIVERINSTALL_F_VALID_MASK 0x 390 #define VBOX_WIN_DRIVERINSTALL_F_VALID_MASK 0x7 89 91 90 92 int VBoxWinDrvInstCreate(PVBOXWINDRVINST hDrvInst); -
trunk/src/VBox/GuestHost/installation/VBoxWinDrvInst.cpp
r106890 r107059 1011 1011 vboxWinDrvInstLogVerbose(pCtx, 1, "Using g_pfnDiInstallDriverW(), dwInstallFlags=%#x", dwInstallFlags); 1012 1012 1013 fRc = g_pfnDiInstallDriverW(NULL /* hWndParent */, pParms->pwszInfFile, dwInstallFlags, &fReboot); 1013 if (!(pParms->fFlags & VBOX_WIN_DRIVERINSTALL_F_DRYRUN)) 1014 fRc = g_pfnDiInstallDriverW(NULL /* hWndParent */, pParms->pwszInfFile, dwInstallFlags, &fReboot); 1015 else 1016 fRc = TRUE; 1014 1017 if (!fRc) 1015 1018 { … … 1056 1059 pParms->u.UnInstall.pwszPnpId, pParms->pwszInfFile, dwInstallFlags); 1057 1060 1058 fRc = g_pfnUpdateDriverForPlugAndPlayDevicesW(NULL /* hWndParent */, 1059 pParms->u.UnInstall.pwszPnpId, 1060 pParms->pwszInfFile, dwInstallFlags, &fReboot); 1061 if (!(pParms->fFlags & VBOX_WIN_DRIVERINSTALL_F_DRYRUN)) 1062 fRc = g_pfnUpdateDriverForPlugAndPlayDevicesW(NULL /* hWndParent */, 1063 pParms->u.UnInstall.pwszPnpId, 1064 pParms->pwszInfFile, dwInstallFlags, &fReboot); 1065 else 1066 fRc = TRUE; 1067 1061 1068 if (!fRc) 1062 1069 { … … 1101 1108 { 1102 1109 RTUTF16 wszDstPathAbs[RTPATH_MAX] = { 0 }; 1103 fRc = g_pfnSetupCopyOEMInfW(wszInfFileAbs, wszSrcPathAbs, SPOST_PATH, 0, 1104 wszDstPathAbs, RT_ELEMENTS(wszDstPathAbs), NULL, NULL); 1110 if (!(pParms->fFlags & VBOX_WIN_DRIVERINSTALL_F_DRYRUN)) 1111 fRc = g_pfnSetupCopyOEMInfW(wszInfFileAbs, wszSrcPathAbs, SPOST_PATH, 0, 1112 wszDstPathAbs, RT_ELEMENTS(wszDstPathAbs), NULL, NULL); 1113 else 1114 fRc = TRUE; 1105 1115 1106 1116 vboxWinDrvInstLogVerbose(pCtx, 1, " INF file: %ls", wszInfFileAbs); … … 1445 1455 vboxWinDrvInstLogVerbose(pCtx, 1, "Using DiUninstallDriverW()"); 1446 1456 BOOL fReboot = FALSE; 1447 fRc = g_pfnDiUninstallDriverW(NULL /* hWndParent */, pCur->wszInfFile, 0 /* Flags */, &fReboot); 1457 if (!(pParms->fFlags & VBOX_WIN_DRIVERINSTALL_F_DRYRUN)) 1458 fRc = g_pfnDiUninstallDriverW(NULL /* hWndParent */, pCur->wszInfFile, 0 /* Flags */, &fReboot); 1459 else 1460 fRc = TRUE; 1448 1461 if (fRc) 1449 1462 pCtx->fReboot = RT_BOOL(fReboot); … … 1466 1479 dwUninstallFlags |= SUOI_FORCEDELETE; 1467 1480 1468 fRc = g_pfnSetupUninstallOEMInfW(pCur->wszInfFile, dwUninstallFlags, NULL /* pReserved */); 1481 if (!(pParms->fFlags & VBOX_WIN_DRIVERINSTALL_F_DRYRUN)) 1482 fRc = g_pfnSetupUninstallOEMInfW(pCur->wszInfFile, dwUninstallFlags, NULL /* pReserved */); 1483 else 1484 fRc = FALSE; 1469 1485 } 1470 1486 … … 1550 1566 bool const fInstall = pParms->enmMode == VBOXWINDRVINSTMODE_INSTALL 1551 1567 || pParms->enmMode == VBOXWINDRVINSTMODE_INSTALL_INFSECTION; 1568 1569 if (pParms->fFlags & VBOX_WIN_DRIVERINSTALL_F_DRYRUN) 1570 vboxWinDrvInstLogWarn(pCtx, "Dry-run mode active -- no installation performed!"); 1552 1571 1553 1572 const char * const pszLogAction = fInstall ? "Installing" : "Uninstalling"; … … 1563 1582 { 1564 1583 vboxWinDrvInstLogInfo(pCtx, "Setting non-interactive mode ..."); 1565 g_pfnSetupSetNonInteractiveMode(TRUE /* fEnable */); 1584 if (!(pParms->fFlags & VBOX_WIN_DRIVERINSTALL_F_DRYRUN)) 1585 g_pfnSetupSetNonInteractiveMode(TRUE /* fEnable */); 1566 1586 } 1567 1587 … … 1772 1792 int rc = RTPathReal(pszInfFile, szInfPathAbs, sizeof(szInfPathAbs)); 1773 1793 if (RT_SUCCESS(rc)) 1794 { 1774 1795 rc = RTStrToUtf16(szInfPathAbs, &pCtx->Parms.pwszInfFile); 1775 1776 if (RT_FAILURE(rc)) 1777 vboxWinDrvInstLogError(pCtx, "Failed to build path for INF file \"%s\", rc=%Rrc", pszInfFile, rc); 1796 if (RT_FAILURE(rc)) 1797 vboxWinDrvInstLogError(pCtx, "Failed to build path for INF file \"%s\", rc=%Rrc", pszInfFile, rc); 1798 } 1799 else 1800 vboxWinDrvInstLogError(pCtx, "Determining real path for INF file \"%s\" failed, rc=%Rrc", pszInfFile, rc); 1778 1801 1779 1802 if (RT_SUCCESS(rc) && pszModel) /* Model is optional. */
Note:
See TracChangeset
for help on using the changeset viewer.