VirtualBox

Changeset 106321 in vbox for trunk/src/VBox/Installer


Ignore:
Timestamp:
Oct 15, 2024 1:06:30 PM (6 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
165131
Message:

Windows installers: Big revamp for removing all DIFxApp-related / DIFxApi-related code and build dependencies for the host and guest installers. bugref:10762

This implements an own framework (VBoxWinDrvInst and VBoxWinDrvStore) for installing Windows drivers and querying / handling the Windows driver store,
along with testcases for the Windows guest and host installers.

Location:
trunk/src/VBox/Installer/win
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Installer/win/InstallHelper/Makefile.kmk

    r106061 r106321  
    5050        VBoxInstallHelper.def \
    5151        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
    5356ifndef VBOX_OSE
    5457 VBoxInstallHelper_SOURCES += \
  • trunk/src/VBox/Installer/win/InstallHelper/VBoxCommon.cpp

    r106061 r106321  
    4242
    4343
     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 */
     53int 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
    4479#ifndef TESTCASE
    4580/**
    4681 * Retrieves a MSI property (in UTF-16).
    4782 *
    48  * Convenience function for VBoxGetMsiProp().
    49  *
    5083 * @returns VBox status code.
    5184 * @param   hMsi                MSI handle to use.
    5285 * @param   pwszName            Name of property to retrieve.
    53  * @param   pwszValueBuf        Where to store the allocated value on success.
    54  * @param   cwcValueBuf         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.
    5588 */
    56 UINT VBoxGetMsiProp(MSIHANDLE hMsi, const WCHAR *pwszName, WCHAR *pwszValueBuf, DWORD cwcValueBuf)
     89int VBoxMsiQueryProp(MSIHANDLE hMsi, const WCHAR *pwszName, WCHAR *pwszVal, DWORD cwVal)
    5790{
    58     RT_BZERO(pwszValueBuf, cwcValueBuf * sizeof(WCHAR));
    59     return MsiGetPropertyW(hMsi, pwszName, pwszValueBuf, &cwcValueBuf);
     91    return VBoxMsiQueryPropEx(hMsi, pwszName, pwszVal, &cwVal);
    6092}
    61 #endif
     93#endif /* !TESTCASE */
    6294
    6395/**
     
    68100 * @returns VBox status code.
    69101 * @param   hMsi                MSI handle to use.
    70  * @param   pcszName            Name of property to retrieve.
     102 * @param   pszName             Name of property to retrieve.
    71103 * @param   ppszValue           Where to store the allocated value on success.
    72104 *                              Must be free'd using RTStrFree() by the caller.
    73105 */
    74 int VBoxGetMsiPropUtf8(MSIHANDLE hMsi, const char *pcszName, char **ppszValue)
     106int VBoxMsiQueryPropUtf8(MSIHANDLE hMsi, const char *pszName, char **ppszValue)
    75107{
     108   AssertPtrReturn(pszName, VERR_INVALID_POINTER);
     109   AssertPtrReturn(ppszValue, VERR_INVALID_POINTER);
     110
    76111    PRTUTF16 pwszName;
    77     int rc = RTStrToUtf16(pcszName, &pwszName);
     112    int rc = RTStrToUtf16(pszName, &pwszName);
    78113    if (RT_SUCCESS(rc))
    79114    {
    80115        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))
    82118            rc = RTUtf16ToUtf8(wszValue, ppszValue);
    83         else
    84             rc = VERR_NOT_FOUND;
    85119
    86120        RTUtf16Free(pwszName);
     
    91125
    92126#ifndef TESTCASE
    93 UINT VBoxSetMsiProp(MSIHANDLE hMsi, const WCHAR *pwszName, const WCHAR *pwszValue)
     127int 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
     148UINT VBoxMsiSetProp(MSIHANDLE hMsi, const WCHAR *pwszName, const WCHAR *pwszValue)
    94149{
    95150    return MsiSetPropertyW(hMsi, pwszName, pwszValue);
     
    97152#endif
    98153
    99 UINT VBoxSetMsiPropDWORD(MSIHANDLE hMsi, const WCHAR *pwszName, DWORD dwVal)
     154UINT VBoxMsiSetPropDWORD(MSIHANDLE hMsi, const WCHAR *pwszName, DWORD dwVal)
    100155{
    101156    wchar_t wszTemp[32];
    102157    RTUtf16Printf(wszTemp, RT_ELEMENTS(wszTemp), "%u", dwVal);
    103     return VBoxSetMsiProp(hMsi, pwszName, wszTemp);
     158    return VBoxMsiSetProp(hMsi, pwszName, wszTemp);
    104159}
    105160
  • trunk/src/VBox/Installer/win/InstallHelper/VBoxCommon.h

    r106061 r106321  
    3636#endif
    3737
    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);
     38int  VBoxMsiQueryProp(MSIHANDLE hMsi, const WCHAR *pwszName, WCHAR *pwszVal, DWORD cwVal);
     39int  VBoxMsiQueryPropEx(MSIHANDLE hMsi, const WCHAR *pwszName, WCHAR *pwszVal, DWORD *pcwVal);
     40int  VBoxMsiQueryPropUtf8(MSIHANDLE hMsi, const char *pszName, char **ppszValue);
     41int  VBoxMsiQueryPropInt32(MSIHANDLE hMsi, const char *pszName, DWORD *pdwValue);
     42UINT VBoxMsiSetProp(MSIHANDLE hMsi, const WCHAR *pwszName, const WCHAR *pwszValue);
     43UINT VBoxMsiSetPropDWORD(MSIHANDLE hMsi, const WCHAR *pwszName, DWORD dwVal);
    4244
    4345#endif /* !VBOX_INCLUDED_SRC_InstallHelper_VBoxCommon_h */
  • trunk/src/VBox/Installer/win/InstallHelper/VBoxInstallHelper.cpp

    r106061 r106321  
    6060#include <iprt/err.h>
    6161#include <iprt/file.h>
     62#include <iprt/initterm.h>
    6263#include <iprt/mem.h>
    6364#include <iprt/path.h>   /* RTPATH_MAX, RTPATH_IS_SLASH */
     
    6667#include <iprt/thread.h>
    6768#include <iprt/utf16.h>
     69
     70#include <VBox/GuestHost/VBoxWinDrvInst.h>
    6871
    6972#include "VBoxCommon.h"
     
    134137BOOL WINAPI DllMain(HANDLE hInst, ULONG uReason, LPVOID pReserved)
    135138{
    136     RT_NOREF(hInst, uReason, pReserved);
     139    RT_NOREF(hInst, pReserved);
    137140
    138141#ifdef DEBUG
     
    147150        case DLL_PROCESS_ATTACH:
    148151        {
     152            int rc = RTR3InitDll(RTR3INIT_FLAGS_UNOBTRUSIVE);
     153            if (RT_FAILURE(rc))
     154                return FALSE;
     155
    149156            g_cRef++;
    150157#if 0
     
    157164             * and 2-3 times during uninstall.
    158165             *
    159              * Note! The DIFxApp.DLL will automatically trigger breakpoints when a
    160              *       debugger is attached.  Just continue on these.
    161166             */
    162167            RTUtf16Printf(wszMsg, RT_ELEMENTS(wszMsg), "Waiting for debugger to attach: windbg -g -G -p %u\n", GetCurrentProcessId());
     
    174179        case DLL_PROCESS_DETACH:
    175180        {
     181            /** @todo RTR3Term(); */
     182
    176183            g_cRef--;
    177184            break;
     
    649656    char *pszTargetDir;
    650657
    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))
    653667    {
    654668        logStringF(hModule, "CheckTargetDir: Checking target directory '%s' ...", pszTargetDir);
    655669
    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;
    670681            if (RT_SUCCESS(vrc))
    671682            {
    672                 if (u.Parsed.fProps & RTPATH_PROP_DOTDOT_REFS)
    673                     vrc = VERR_INVALID_PARAMETER;
     683                vrc = initTargetDirSecurityCtx(&g_TargetDirSecCtx, hModule, pszTargetDir);
    674684                if (RT_SUCCESS(vrc))
    675685                {
    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:\"). */
    678689                    {
    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))
    682696                        {
    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);
    686698                            if (RT_FAILURE(vrc))
    687699                                break;
    688                             if (RTDirExists(szPathToCheck))
    689                             {
    690                                 vrc = checkTargetDirOne(hModule, &g_TargetDirSecCtx, szPathToCheck);
    691                                 if (RT_FAILURE(vrc))
    692                                     break;
    693                             }
    694                             else
    695                                 logStringF(hModule, "CheckTargetDir: Path '%s' does not exist (yet)", szPathToCheck);
    696                             idxComp--;
    697700                        }
    698 
    699                         destroyTargetDirSecurityCtx(&g_TargetDirSecCtx);
     701                        else
     702                            logStringF(hModule, "CheckTargetDir: Path '%s' does not exist (yet)", szPathToCheck);
     703                        idxComp--;
    700704                    }
    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);
    706707                }
    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);
    711717
    712718        RTStrFree(pszTargetDir);
     
    716722    {
    717723        logStringF(hModule, "CheckTargetDir: Checking failed with %Rrc", vrc);
    718         VBoxSetMsiProp(hModule, L"VBox_Target_Dir_Is_Valid", L"0");
     724        VBoxMsiSetProp(hModule, L"VBox_Target_Dir_Is_Valid", L"0");
    719725    }
    720726
     
    988994    {
    989995        logStringF(hModule, "IsPythonInstalled: Python installation found at \"%ls\"", wszPythonPath);
    990         VBoxSetMsiProp(hModule, L"VBOX_PYTHON_PATH", wszPythonPath);
    991         VBoxSetMsiProp(hModule, L"VBOX_PYTHON_INSTALLED", L"1");
     996        VBoxMsiSetProp(hModule, L"VBOX_PYTHON_PATH", wszPythonPath);
     997        VBoxMsiSetProp(hModule, L"VBOX_PYTHON_INSTALLED", L"1");
    992998    }
    993999    else
     
    9951001        logStringF(hModule, "IsPythonInstalled: Error: No suitable Python installation found (%u), skipping installation.", rcWin);
    9961002        logStringF(hModule, "IsPythonInstalled: Python seems not to be installed; please download + install the Python Core package.");
    997         VBoxSetMsiProp(hModule, L"VBOX_PYTHON_INSTALLED", L"0");
     1003        VBoxMsiSetProp(hModule, L"VBOX_PYTHON_INSTALLED", L"0");
    9981004    }
    9991005
     
    10251031        logStringF(hModule, "ArePythonAPIDepsInstalled: Failed with dwErr=%u", dwErr);
    10261032
    1027     VBoxSetMsiProp(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");
    10281034    return ERROR_SUCCESS; /* Never return failure. */
    10291035}
     
    10641070                if (lrc == ERROR_SUCCESS)
    10651071                {
    1066                     VBoxSetMsiPropDWORD(hModule, L"VBOX_MSCRT_VER_MAJ", dwMaj);
     1072                    VBoxMsiSetPropDWORD(hModule, L"VBOX_MSCRT_VER_MAJ", dwMaj);
    10671073
    10681074                    DWORD dwMin = 0;
     
    10701076                    if (lrc == ERROR_SUCCESS)
    10711077                    {
    1072                         VBoxSetMsiPropDWORD(hModule, L"VBOX_MSCRT_VER_MIN", dwMin);
     1078                        VBoxMsiSetPropDWORD(hModule, L"VBOX_MSCRT_VER_MIN", dwMin);
    10731079
    10741080                        logStringF(hModule, "IsMSCRTInstalled: Found v%u.%u\n", dwMaj, dwMin);
     
    10761082                        /* Check for at least 2019. */
    10771083                        if (dwMaj > 14 || (dwMaj == 14 && dwMin >= 20))
    1078                             VBoxSetMsiProp(hModule, L"VBOX_MSCRT_INSTALLED", L"1");
     1084                            VBoxMsiSetProp(hModule, L"VBOX_MSCRT_INSTALLED", L"1");
    10791085                    }
    10801086                    else
     
    11291135            logStringF(hModule, "IsWindows10/CurrentMajorVersionNumber: %u", dwVal);
    11301136
    1131             VBoxSetMsiProp(hModule, L"VBOX_IS_WINDOWS_10", dwVal >= 10 ? L"1" : L"");
     1137            VBoxMsiSetProp(hModule, L"VBOX_IS_WINDOWS_10", dwVal >= 10 ? L"1" : L"");
    11321138        }
    11331139        else
     
    11611167    if (rcWin != ERROR_SUCCESS)
    11621168    {
    1163         VBoxSetMsiProp(hModule, L"VBOX_API_INSTALLED", L"0");
     1169        VBoxMsiSetProp(hModule, L"VBOX_API_INSTALLED", L"0");
    11641170        return ERROR_SUCCESS;
    11651171    }
     
    11701176    /* Get the VBox API setup string. */
    11711177    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))
    11741180    {
    11751181        /* Make sure our current working directory is the VBox installation path. */
     
    11991205                    {
    12001206                        logStringF(hModule, "InstallPythonAPI: VBox API looks good.");
    1201                         VBoxSetMsiProp(hModule, L"VBOX_API_INSTALLED", L"1");
     1207                        VBoxMsiSetProp(hModule, L"VBOX_API_INSTALLED", L"1");
    12021208                        return ERROR_SUCCESS;
    12031209                    }
     
    12181224    }
    12191225    else
    1220         logStringF(hModule, "InstallPythonAPI: Unable to retrieve VBox installation directory: rcWin=%u (%#x)", rcWin, rcWin);
    1221 
    1222     VBoxSetMsiProp(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");
    12231229    logStringF(hModule, "InstallPythonAPI: Installation failed");
    12241230    return ERROR_SUCCESS; /* Do not fail here. */
     
    13731379
    13741380    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))
    13771383    {
    13781384        size_t const cwcPath = RTUtf16Len(wszPath);
     
    13881394    }
    13891395
    1390     logStringF(hModule, "UninstallBranding: Handling done. (rc=%u (ignored))", rc);
     1396    logStringF(hModule, "UninstallBranding: Handling done. (rc=%Rrc (ignored))", rc);
    13911397    return ERROR_SUCCESS; /* Do not fail here. */
    13921398}
     
    14001406     */
    14011407    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))
    14041410    {
    14051411        wchar_t wszDstPath[RTPATH_MAX];
    1406         rc = VBoxGetMsiProp(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))
    14081414        {
    14091415            /*
    14101416             * First we copy the src\.custom dir to the target.
    14111417             */
    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)
    14171423                {
    14181424                    /*
    14191425                     * The rename the '.custom' directory we now got in the target area to 'custom'.
    14201426                     */
    1421                     rc = JoinPaths(wszSrcPath, RT_ELEMENTS(wszSrcPath), wszDstPath, L".custom", true /*fDoubleTerm*/);
     1427                    rcWin = JoinPaths(wszSrcPath, RT_ELEMENTS(wszSrcPath), wszDstPath, L".custom", true /*fDoubleTerm*/);
    14221428                    if (rc == ERROR_SUCCESS)
    14231429                    {
    1424                         rc = AppendToPath(wszDstPath, RT_ELEMENTS(wszDstPath), L"custom", true /*fDoubleTerm*/);
     1430                        rcWin = AppendToPath(wszDstPath, RT_ELEMENTS(wszDstPath), L"custom", true /*fDoubleTerm*/);
    14251431                        if (rc == ERROR_SUCCESS)
    1426                             rc = RenameDir(hModule, wszDstPath, wszSrcPath);
     1432                            rcWin = RenameDir(hModule, wszDstPath, wszSrcPath);
    14271433                    }
    14281434                }
    14291435            }
    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
     1445static 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
     1461UINT __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
     1520UINT __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);
    14341570    return ERROR_SUCCESS; /* Do not fail here. */
    14351571}
  • trunk/src/VBox/Installer/win/InstallHelper/VBoxInstallHelper.def

    r106061 r106321  
    4545    UninstallTAPInstances
    4646    UninstallVBoxDrv
     47    DriverInstall
     48    DriverUninstall
    4749    CreateHostOnlyInterface
    4850    StopHostOnlyInterfaces
  • trunk/src/VBox/Installer/win/Makefile.kmk

    r106061 r106321  
    7575 VBOX_WITH_DOCS_PACKING         :=
    7676 VBOX_WITH_QTGUI                :=
    77  VBOX_WITH_USB                  :=
     77 VBOX_WITH_USB                  := 1
    7878 VBOX_WITH_VBOX_IMG             :=
    7979 VBOX_WITH_VBOXSDL              :=
     
    310310#
    311311VBOX_TOOLS_WIN_WIX_EXT := \
    312         -lib $(VBOX_TOOLS_WIN_WIXEXT_DIR)/difxapp_$(if-expr "$(KBUILD_TARGET_ARCH)" == "x86",x86,x64).wixlib \
    313312        $(if-expr defined(VBOX_WITH_MSI_HACK),-ext $(MsiHack_0_OUTDIR)/MsiHackExtension.dll,) \
    314313        -ext $(VBOX_TOOLS_WIN_WIXEXT_DIR)/WixToolset.Ui.wixext.dll \
    315         -ext $(VBOX_TOOLS_WIN_WIXEXT_DIR)/WixToolset.DifxApp.wixext.dll \
    316314        -ext $(VBOX_TOOLS_WIN_WIXEXT_DIR)/WixToolset.Util.wixext.dll
    317315
     
    578576                -loc $(VBOX_WIN_INST_OUT_DIR)/NLS/License_$(lang).wxl \
    579577                -lib $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_$(lang).wixlib \
    580                 -ext $(VBOX_TOOLS_WIN_WIXEXT_DIR)/WixToolset.DifxApp.wixext.dll \
    581578                -ext $(VBOX_TOOLS_WIN_WIXEXT_DIR)/WixToolset.Util.wixext.dll \
    582579                -pdbtype none \
     
    596593                '  files-VirtualBox_$(lang)/License_$(lang).wxl ^' \
    597594                '  -lib VirtualBox_en_US.wixlib ^' \
    598                 '  -ext $(VBOX_TOOLS_WIN_WIXEXT_DIR)/WixToolset.DifxApp.wixext.dll ^' \
    599595                '  -ext $(VBOX_TOOLS_WIN_WIXEXT_DIR)/WixToolset.Util.wixext.dll ^' \
    600596                '  -pdbtype none ^' \
     
    10591055                -lib $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_en_US.wixlib \
    10601056                -ext $(VBOX_TOOLS_WIN_WIXEXT_DIR)/WixToolset.Util.wixext.dll \
    1061                 -ext $(VBOX_TOOLS_WIN_WIXEXT_DIR)/WixToolset.DifxApp.wixext.dll \
    10621057                -pdbtype none \
    10631058                -out $$(@D)/$(PACKAGE_NAME_LANG)_$(lang).msi
  • trunk/src/VBox/Installer/win/Scripts/Combined-3-RepackAdditions.cmd

    r106061 r106321  
    237237        -E "PATH_TARGET_X86=%_MY_REPACK_DIR_X86%\resources" ^
    238238        -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" ^
    240239        -E "VBOX_VENDOR=Oracle Corporation" -E "VBOX_VENDOR_SHORT=Oracle" -E "VBOX_PRODUCT=Oracle VirtualBox" ^
    241240        -E "VBOX_C_YEAR=@VBOX_C_YEAR@" -E "VBOX_VERSION_STRING=@VBOX_VERSION_STRING@" -E "VBOX_VERSION_STRING_RAW=@VBOX_VERSION_STRING_RAW@" ^
     
    268267        -E "PATH_TARGET_X86=%_MY_REPACK_DIR_X86%\resources" ^
    269268        -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" ^
    271269        -E "VBOX_VENDOR=Oracle Corporation" -E "VBOX_VENDOR_SHORT=Oracle" -E "VBOX_PRODUCT=Oracle VirtualBox" ^
    272270        -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  
    2424-->
    2525
    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">
    2727
    2828<?ifdef env.VBOX_QT_INFIX ?>
     
    5151<?if $(env.VBOX_SIGNING_MODE) != none ?>
    5252            <Component Id="cp_VBoxSupCat_PreW10" Guid="673195c2-f315-42e7-ff00-5acbd91ea0bd" Bitness="$(var.Property_Bitness)" Condition="(NOT VBOX_IS_WINDOWS_10)">
    53 
    5453                <File Id="file_VBoxSup_PreW10.cat" Name="VBoxSup.cat" Source="$(env.PATH_OUT)\bin\VBoxSup-PreW10.cat" />
    5554            </Component>
    5655            <Component Id="cp_VBoxSupCat_W10" Guid="589be90d-0286-4684-503d-a1681f9587bc" Bitness="$(var.Property_Bitness)" Condition="(VBOX_IS_WINDOWS_10)">
    57 
    5856                <File Id="file_VBoxSup.cat" Name="VBoxSup.cat" Source="$(env.PATH_OUT)\bin\VBoxSup.cat" />
    5957            </Component>
    6058<?endif?>
    6159            <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. -->
    6361                <File Id="file_VBoxSup.sys" Name="VBoxSup.sys" KeyPath="yes" Source="$(env.PATH_OUT)\bin\VBoxSup.sys" />
    6462                <File Id="file_VBoxSup.inf" Name="VBoxSup.inf" Source="$(env.PATH_OUT)\bin\VBoxSup.inf" />
  • trunk/src/VBox/Installer/win/VBoxMergeAppCA.wxi

    r106061 r106321  
    2626<Include xmlns="http://wixtoolset.org/schemas/v4/wxs">
    2727
     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
    2837<?if $(env.VBOX_WITH_CRT_PACKING) = "no" ?>
    2938    <CustomAction Id="ca_IsMSCRTInstalled" DllEntry="IsMSCRTInstalled" Execute="immediate" Return="ignore" Impersonate="no" BinaryRef="VBoxInstallHelper" />
  • trunk/src/VBox/Installer/win/VBoxMergeAppSeq.wxi

    r106061 r106321  
    2626<Include xmlns="http://wixtoolset.org/schemas/v4/wxs">
    2727
     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=&quot;ALL&quot;)" />
     36    <Custom Action="ca_VBoxSupDrvUninst" After="InstallInitialize"
     37            Condition="NOT (UPGRADINGPRODUCTCODE) AND (Installed) AND (REMOVE=&quot;ALL&quot;)" />
     38
    2839<?if $(env.VBOX_WITH_CRT_PACKING) = "no" ?>
    2940    <Custom Action="ca_IsMSCRTInstalled" Before="LaunchConditions"/>
  • trunk/src/VBox/Installer/win/VBoxMergeUSB.wxi

    r106061 r106321  
    2424-->
    2525
    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">
    2727
    2828    <Directory Id="dir_VBoxUSBFilter" Name="filter">
     
    3838<?endif?>
    3939        <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" />
    4140            <File Id="file_VBoxUSBMon.sys" Name="VBoxUSBMon.sys" Source="$(env.PATH_OUT)\bin\VBoxUSBMon.sys" />
    4241            <File Id="file_VBoxUSBMon.inf" Name="VBoxUSBMon.inf" Source="$(env.PATH_OUT)\bin\VBoxUSBMon.inf" />
     
    5655<?endif?>
    5756        <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" />
    5957            <File Id="file_VBoxUSB.sys" Name="VBoxUSB.sys" Source="$(env.PATH_OUT)\bin\VBoxUSB.sys" />
    6058            <File Id="file_VBoxUSB.inf" Name="VBoxUSB.inf" Source="$(env.PATH_OUT)\bin\VBoxUSB.inf" />
  • trunk/src/VBox/Installer/win/VBoxMergeUSBCA.wxi

    r106061 r106321  
    2626<Include xmlns="http://wixtoolset.org/schemas/v4/wxs">
    2727
     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
    2846</Include>
     47
  • trunk/src/VBox/Installer/win/VBoxMergeUSBSeq.wxi

    r106061 r106321  
    2626<Include xmlns="http://wixtoolset.org/schemas/v4/wxs">
    2727
     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=&quot;ALL&quot;)" />
     36    <Custom Action="ca_VBoxUSBDevDrvUninst" After="InstallInitialize"
     37            Condition="NOT (UPGRADINGPRODUCTCODE) AND (Installed) AND (REMOVE=&quot;ALL&quot;)"/>
     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=&quot;ALL&quot;)" />
     47    <Custom Action="ca_VBoxUSBMonDrvUninst" After="InstallInitialize"
     48            Condition="NOT (UPGRADINGPRODUCTCODE) AND (Installed) AND (REMOVE=&quot;ALL&quot;)" />
     49
    2850</Include>
     51
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette