VirtualBox

Ignore:
Timestamp:
Sep 5, 2022 7:08:21 PM (2 years ago)
Author:
vboxsync
Message:

Add/NT/Inst: Merged the NT4 video driver helper executable VBoxGuestDrvInst.exe into VBoxDrvInst.exe, it only had one function and one structure we need to be careful with. bugref:10261

Location:
trunk/src/VBox/Additions/WINNT/Installer
Files:
2 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Installer/Makefile.kmk

    r96453 r96605  
    5757        VBoxDrvInst.rc
    5858
    59 PROGRAMS += VBoxGuestDrvInst
    60 VBoxGuestDrvInst_TEMPLATE     := VBoxGuestR3Exe
    61 VBoxGuestDrvInst_DEFS         :=  _WIN32_WINNT=0x0400
    62 VBoxGuestDrvInst_BLD_TRG_ARCH := x86
    63 VBoxGuestDrvInst_SOURCES      := \
    64         VBoxGuestDrvInst.cpp \
    65         VBoxGuestDrvInst.rc
    66 
    6759PROGRAMS += RegCleanup
    6860RegCleanup_TEMPLATE     := VBoxGuestR3Exe
     
    8476
    8577DRIVER_FILES := \
    86         $(PATH_STAGE_BIN)/additions/VBoxGuestDrvInst.exe \
    8778        $(PATH_STAGE_BIN)/additions/RegCleanup.exe \
    8879        $(PATH_STAGE_BIN)/additions/VBoxMouse.sys \
  • trunk/src/VBox/Additions/WINNT/Installer/VBoxDrvInst.cpp

    r96457 r96605  
    3939#include <iprt/win/windows.h>
    4040#include <iprt/win/setupapi.h>
     41#include <devguid.h>
     42#include <RegStr.h>
    4143
    4244#include <iprt/asm.h>
     
    8082
    8183#ifdef DEBUG
    82 # define VBOX_DRVINST_LOGFILE                 "C:\\Temp\\VBoxDrvInstDIFx.log"
     84# define VBOX_DRVINST_LOGFILE                   "C:\\Temp\\VBoxDrvInstDIFx.log"
    8385#endif
     86
     87/** NT4: The video service name. */
     88#define VBOXGUEST_NT4_VIDEO_NAME                "VBoxVideo"
     89/** NT4: The video inf file name */
     90#define VBOXGUEST_NT4_VIDEO_INF_NAME            "VBoxVideo.inf"
    8491
    8592
     
    628635
    629636
     637/**
     638 * Inner NT4 video driver installation function.
     639 *
     640 * This can normally return immediately on errors as the parent will do the
     641 * cleaning up.
     642 */
     643static int InstallNt4VideoDriverInner(WCHAR const * const pwszDriverDir, HDEVINFO hDevInfo, HINF *phInf)
     644{
     645    /*
     646     * Get the first found driver - our Inf file only contains one so this is ok.
     647     *
     648     * Note! We must use the V1 structure here as it is the only NT4 recognizes.
     649     *       There are four versioned structures:
     650     *          - SP_ALTPLATFORM_INFO
     651     *          - SP_DRVINFO_DATA_W
     652     *          - SP_BACKUP_QUEUE_PARAMS_W
     653     *          - SP_INF_SIGNER_INFO_W,
     654     *       but we only make use of SP_DRVINFO_DATA_W.
     655     */
     656    SetLastError(NO_ERROR);
     657    SP_DRVINFO_DATA_V1_W drvInfoData = { sizeof(drvInfoData) };
     658    if (!SetupDiEnumDriverInfoW(hDevInfo, NULL, SPDIT_CLASSDRIVER, 0, &drvInfoData))
     659        return ErrorMsgLastErr("SetupDiEnumDriverInfoW");
     660
     661    /*
     662     * Get necessary driver details
     663     */
     664    union
     665    {
     666        SP_DRVINFO_DETAIL_DATA_W s;
     667        uint64_t                 au64Padding[(sizeof(SP_DRVINFO_DETAIL_DATA_W) + 256) / sizeof(uint64_t)];
     668    } DriverInfoDetailData = { { sizeof(DriverInfoDetailData.s) } };
     669    DWORD                    cbReqSize            = NULL;
     670    if (   !SetupDiGetDriverInfoDetailW(hDevInfo, NULL, &drvInfoData,
     671                                        &DriverInfoDetailData.s, sizeof(DriverInfoDetailData), &cbReqSize)
     672        && GetLastError() != ERROR_INSUFFICIENT_BUFFER)
     673        return ErrorMsgLastErr("SetupDiGetDriverInfoDetailW");
     674
     675    HINF hInf = *phInf = SetupOpenInfFileW(DriverInfoDetailData.s.InfFileName, NULL, INF_STYLE_WIN4, NULL);
     676    if (hInf == INVALID_HANDLE_VALUE)
     677        return ErrorMsgLastErr("SetupOpenInfFileW");
     678
     679    /*
     680     * First install the service.
     681     */
     682    WCHAR wszServiceSection[LINE_LEN];
     683    int rc = RTUtf16Copy(wszServiceSection, RT_ELEMENTS(wszServiceSection), DriverInfoDetailData.s.SectionName);
     684    if (RT_SUCCESS(rc))
     685        rc = RTUtf16CatAscii(wszServiceSection, RT_ELEMENTS(wszServiceSection), ".Services");
     686    if (RT_FAILURE(rc))
     687        return ErrorMsg("wszServiceSection too small");
     688
     689    INFCONTEXT SvcCtx;
     690    if (!SetupFindFirstLineW(hInf, wszServiceSection, NULL, &SvcCtx))
     691        return ErrorMsgLastErr("SetupFindFirstLine"); /* impossible... */
     692
     693    /*
     694     * Get the name
     695     */
     696    WCHAR wszServiceData[LINE_LEN] = {0};
     697    if (!SetupGetStringFieldW(&SvcCtx, 1, wszServiceData, RT_ELEMENTS(wszServiceData), NULL))
     698        return ErrorMsgLastErr("SetupGetStringFieldW");
     699
     700    WCHAR wszDevInstanceId[LINE_LEN];
     701    rc = RTUtf16CopyAscii(wszDevInstanceId, RT_ELEMENTS(wszDevInstanceId), "Root\\LEGACY_");
     702    if (RT_SUCCESS(rc))
     703        rc = RTUtf16Cat(wszDevInstanceId, RT_ELEMENTS(wszDevInstanceId), wszServiceData);
     704    if (RT_SUCCESS(rc))
     705        rc = RTUtf16CatAscii(wszDevInstanceId, RT_ELEMENTS(wszDevInstanceId), "\\0000");
     706    if (RT_FAILURE(rc))
     707        return ErrorMsg("wszDevInstanceId too small");
     708
     709    /*
     710     * ...
     711     */
     712    SP_DEVINFO_DATA deviceInfoData = { sizeof(deviceInfoData) };
     713    /* Check for existing first. */
     714    BOOL fDevInfoOkay = SetupDiOpenDeviceInfoW(hDevInfo, wszDevInstanceId, NULL, 0, &deviceInfoData);
     715    if (!fDevInfoOkay)
     716    {
     717        /* Okay, try create a new device info element. */
     718        if (SetupDiCreateDeviceInfoW(hDevInfo, wszDevInstanceId, (LPGUID)&GUID_DEVCLASS_DISPLAY,
     719                                     NULL, // Do we need a description here?
     720                                     NULL, // No user interface
     721                                     0, &deviceInfoData))
     722        {
     723            if (SetupDiRegisterDeviceInfo(hDevInfo, &deviceInfoData, 0, NULL, NULL, NULL))
     724                fDevInfoOkay = TRUE;
     725            else
     726                return ErrorMsgLastErr("SetupDiRegisterDeviceInfo"); /** @todo Original code didn't return here. */
     727        }
     728        else
     729            return ErrorMsgLastErr("SetupDiCreateDeviceInfoW"); /** @todo Original code didn't return here. */
     730    }
     731    if (fDevInfoOkay) /** @todo if not needed if it's okay to fail on failure above */
     732    {
     733        /* We created a new key in the registry */ /* bogus... */
     734
     735        /*
     736         * Redo the install parameter thing with deviceInfoData.
     737         */
     738        SP_DEVINSTALL_PARAMS_W DeviceInstallParams = { sizeof(DeviceInstallParams) };
     739        if (!SetupDiGetDeviceInstallParamsW(hDevInfo, &deviceInfoData, &DeviceInstallParams))
     740            return ErrorMsgLastErr("SetupDiGetDeviceInstallParamsW(#2)"); /** @todo Original code didn't return here. */
     741
     742        DeviceInstallParams.cbSize = sizeof(DeviceInstallParams);
     743        DeviceInstallParams.Flags |= DI_NOFILECOPY      /* We did our own file copying */
     744                                   | DI_DONOTCALLCONFIGMG
     745                                   | DI_ENUMSINGLEINF;  /* .DriverPath specifies an inf file */
     746        rc = RTUtf16Copy(DeviceInstallParams.DriverPath, RT_ELEMENTS(DeviceInstallParams.DriverPath), pwszDriverDir);
     747        if (RT_SUCCESS(rc))
     748            rc = RTUtf16CatAscii(DeviceInstallParams.DriverPath, RT_ELEMENTS(DeviceInstallParams.DriverPath),
     749                                 VBOXGUEST_NT4_VIDEO_INF_NAME);
     750        if (RT_FAILURE(rc))
     751            return ErrorMsg("Install dir too deep (long)");
     752
     753        if (!SetupDiSetDeviceInstallParamsW(hDevInfo, &deviceInfoData, &DeviceInstallParams))
     754            return ErrorMsgLastErr("SetupDiSetDeviceInstallParamsW(#2)"); /** @todo Original code didn't return here. */
     755
     756        if (!SetupDiBuildDriverInfoList(hDevInfo, &deviceInfoData, SPDIT_CLASSDRIVER))
     757            return ErrorMsgLastErr("SetupDiBuildDriverInfoList(#2)");
     758
     759        /*
     760         * Repeat the query at the start of the function.
     761         */
     762        drvInfoData.cbSize = sizeof(drvInfoData);
     763        if (!SetupDiEnumDriverInfoW(hDevInfo, &deviceInfoData, SPDIT_CLASSDRIVER, 0, &drvInfoData))
     764            return ErrorMsgLastErr("SetupDiEnumDriverInfoW(#2)");
     765
     766        /*
     767         * ...
     768         */
     769        if (!SetupDiSetSelectedDriverW(hDevInfo, &deviceInfoData, &drvInfoData))
     770            return ErrorMsgLastErr("SetupDiSetSelectedDriverW(#2)");
     771
     772        if (!SetupDiInstallDevice(hDevInfo, &deviceInfoData))
     773            return ErrorMsgLastErr("SetupDiInstallDevice(#2)");
     774    }
     775
     776    /*
     777     * Make sure the device is enabled.
     778     */
     779    DWORD fConfig = 0;
     780    if (SetupDiGetDeviceRegistryPropertyW(hDevInfo, &deviceInfoData, SPDRP_CONFIGFLAGS,
     781                                          NULL, (LPBYTE)&fConfig, sizeof(DWORD), NULL))
     782    {
     783        if (fConfig & CONFIGFLAG_DISABLED)
     784        {
     785            fConfig &= ~CONFIGFLAG_DISABLED;
     786            if (!SetupDiSetDeviceRegistryPropertyW(hDevInfo, &deviceInfoData, SPDRP_CONFIGFLAGS,
     787                                                   (LPBYTE)&fConfig, sizeof(fConfig)))
     788                ErrorMsg("SetupDiSetDeviceRegistryPropertyW");
     789        }
     790    }
     791    else
     792        ErrorMsg("SetupDiGetDeviceRegistryPropertyW");
     793
     794    /*
     795     * Open the service key.
     796     */
     797    WCHAR wszSvcRegKey[LINE_LEN + 64];
     798    rc = RTUtf16CopyAscii(wszSvcRegKey, RT_ELEMENTS(wszSvcRegKey), "System\\CurrentControlSet\\Services\\");
     799    if (RT_SUCCESS(rc))
     800        rc = RTUtf16Cat(wszSvcRegKey, RT_ELEMENTS(wszSvcRegKey), wszServiceData);
     801    if (RT_SUCCESS(rc))
     802        rc = RTUtf16CatAscii(wszSvcRegKey, RT_ELEMENTS(wszSvcRegKey), "\\Device0"); /* We only have one device. */
     803    if (RT_FAILURE(rc))
     804        return ErrorMsg("Service key name too long");
     805
     806    DWORD   dwIgn;
     807    HKEY    hKey = NULL;
     808    LSTATUS lrc  = RegCreateKeyExW(HKEY_LOCAL_MACHINE, wszSvcRegKey, 0, NULL, REG_OPTION_NON_VOLATILE,
     809                                   KEY_READ | KEY_WRITE, NULL, &hKey, &dwIgn);
     810    if (lrc == ERROR_SUCCESS)
     811    {
     812        /*
     813         * Insert service description.
     814         */
     815        lrc = RegSetValueExW(hKey, L"Device Description", 0, REG_SZ, (LPBYTE)DriverInfoDetailData.s.DrvDescription,
     816                            (DWORD)((RTUtf16Len(DriverInfoDetailData.s.DrvDescription) + 1) * sizeof(WCHAR)));
     817        if (lrc != ERROR_SUCCESS)
     818            ErrorMsgLStatus("RegSetValueExW", lrc);
     819
     820        /*
     821         * Execute the SoftwareSettings section of the INF-file or something like that.
     822         */
     823        BOOL fOkay = FALSE;
     824        WCHAR wszSoftwareSection[LINE_LEN + 32];
     825        rc = RTUtf16Copy(wszSoftwareSection, RT_ELEMENTS(wszSoftwareSection), wszServiceData);
     826        if (RT_SUCCESS(rc))
     827            rc = RTUtf16CatAscii(wszSoftwareSection, RT_ELEMENTS(wszSoftwareSection), ".SoftwareSettings");
     828        if (RT_SUCCESS(rc))
     829        {
     830            if (SetupInstallFromInfSectionW(NULL, hInf, wszSoftwareSection, SPINST_REGISTRY, hKey,
     831                                            NULL, 0, NULL, NULL, NULL, NULL))
     832                fOkay = TRUE;
     833            else
     834                ErrorMsgLastErr("SetupInstallFromInfSectionW");
     835        }
     836        else
     837            ErrorMsg("Software settings section name too long");
     838        RegCloseKey(hKey);
     839        if (!fOkay)
     840            return EXIT_FAIL;
     841    }
     842    else
     843        ErrorMsgLStatus("RegCreateKeyExW/Service", lrc);
     844
     845    /*
     846     * Install OpenGL stuff.
     847     */
     848    lrc = RegCreateKeyExW(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\OpenGLDrivers", 0, NULL,
     849                          REG_OPTION_NON_VOLATILE, KEY_READ | KEY_WRITE, NULL, &hKey, &dwIgn);
     850    if (lrc == ERROR_SUCCESS)
     851    {
     852        /* Do installation here if ever necessary. Currently there is no OpenGL stuff */
     853        RegCloseKey(hKey);
     854    }
     855    else
     856        ErrorMsgLStatus("RegCreateKeyExW/OpenGLDrivers", lrc);
     857
     858#if 0
     859    /* If this key is inserted into the registry, windows will show the desktop
     860       applet on next boot. We decide in the installer if we want that so the code
     861       is disabled here. */
     862    lrc = RegCreateKeyExW(HKEY_LOCAL_MACHINE, L"SYSTEM\\CurrentControlSet\\Control\\GraphicsDrivers\\NewDisplay",
     863                          0, NULL, REG_OPTION_NON_VOLATILE,
     864                          KEY_READ | KEY_WRITE, NULL, &hHey, &dwIgn)
     865    if (lrc == ERROR_SUCCESS)
     866        RegCloseKey(hHey);
     867    else
     868        ErrorMsgLStatus("RegCreateKeyExW/NewDisplay", lrc);
     869#endif
     870
     871    /*
     872     * We must reboot at some point
     873     */
     874    lrc = RegCreateKeyExW(HKEY_LOCAL_MACHINE, L"SYSTEM\\CurrentControlSet\\Control\\GraphicsDrivers\\RebootNecessary", 0, NULL,
     875                          REG_OPTION_NON_VOLATILE, KEY_READ | KEY_WRITE, NULL, &hKey, &dwIgn);
     876    if (lrc == ERROR_SUCCESS)
     877        RegCloseKey(hKey);
     878    else
     879        ErrorMsgLStatus("RegCreateKeyExW/RebootNecessary", lrc);
     880
     881    return EXIT_OK;
     882}
     883
     884
     885
     886/**
     887 * Install the VBox video driver.
     888 *
     889 * @param   pwszDriverDir     The base directory where we find the INF.
     890 */
     891static int InstallNt4VideoDriver(WCHAR const * const pwszDriverDir)
     892{
     893    /*
     894     * Create an empty list
     895     */
     896    HDEVINFO hDevInfo = SetupDiCreateDeviceInfoList((LPGUID)&GUID_DEVCLASS_DISPLAY, NULL);
     897    if (hDevInfo == INVALID_HANDLE_VALUE)
     898        return ErrorMsgLastErr("SetupDiCreateDeviceInfoList");
     899
     900    /*
     901     * Get the default install parameters.
     902     */
     903    int rcExit = EXIT_FAIL;
     904    SP_DEVINSTALL_PARAMS_W DeviceInstallParams = { sizeof(DeviceInstallParams) };
     905    if (SetupDiGetDeviceInstallParamsW(hDevInfo, NULL, &DeviceInstallParams))
     906    {
     907        /*
     908         * Insert our install parameters and update hDevInfo with them.
     909         */
     910        DeviceInstallParams.cbSize = sizeof(DeviceInstallParams);
     911        DeviceInstallParams.Flags |= DI_NOFILECOPY /* We did our own file copying */
     912                                   | DI_DONOTCALLCONFIGMG
     913                                   | DI_ENUMSINGLEINF; /* .DriverPath specifies an inf file */
     914        int rc = RTUtf16Copy(DeviceInstallParams.DriverPath, RT_ELEMENTS(DeviceInstallParams.DriverPath), pwszDriverDir);
     915        if (RT_SUCCESS(rc))
     916            rc = RTUtf16CatAscii(DeviceInstallParams.DriverPath, RT_ELEMENTS(DeviceInstallParams.DriverPath),
     917                                 VBOXGUEST_NT4_VIDEO_INF_NAME);
     918        if (RT_SUCCESS(rc))
     919        {
     920            if (SetupDiSetDeviceInstallParamsW(hDevInfo, NULL, &DeviceInstallParams))
     921            {
     922                /*
     923                 * Read the drivers from the INF-file.
     924                 */
     925                if (SetupDiBuildDriverInfoList(hDevInfo, NULL, SPDIT_CLASSDRIVER))
     926                {
     927                    HINF hInf = NULL;
     928                    rcExit = InstallNt4VideoDriverInner(pwszDriverDir, hDevInfo, &hInf);
     929
     930                    if (hInf)
     931                        SetupCloseInfFile(hInf);
     932                    SetupDiDestroyDriverInfoList(hDevInfo, NULL, SPDIT_CLASSDRIVER);
     933                }
     934                else
     935                    ErrorMsgLastErr("SetupDiBuildDriverInfoList");
     936            }
     937            else
     938                ErrorMsgLastErr("SetupDiSetDeviceInstallParamsW");
     939
     940        }
     941        else
     942            ErrorMsg("Install dir too deep (long)");
     943        SetupDiDestroyDeviceInfoList(hDevInfo);
     944    }
     945    else
     946        ErrorMsgLastErr("SetupDiGetDeviceInstallParams"); /** @todo Original code didn't return here. */
     947    SetupDiDestroyDeviceInfoList(hDevInfo);
     948    return rcExit;
     949}
     950
     951
     952/** Handles 'driver nt4-install-video'. */
     953static int handleDriverNt4InstallVideo(unsigned cArgs, wchar_t **papwszArgs)
     954{
     955    /* One optional parameter: installation directory containing INF file. */
     956    WCHAR wszInstallDir[MAX_PATH];
     957    DWORD cwcInstallDir;
     958    if (cArgs < 1)
     959    {
     960        cwcInstallDir = GetModuleFileNameW(GetModuleHandle(NULL), &wszInstallDir[0], RT_ELEMENTS(wszInstallDir));
     961        if (cwcInstallDir > 0)
     962        {
     963            while (cwcInstallDir > 0 && !RTPATH_IS_SEP(wszInstallDir[cwcInstallDir - 1]))
     964                cwcInstallDir--;
     965            if (!cwcInstallDir) /* paranoia^3 */
     966            {
     967                wszInstallDir[cwcInstallDir++] = '.';
     968                wszInstallDir[cwcInstallDir++] = '\\';
     969            }
     970            wszInstallDir[cwcInstallDir] = '\0';
     971        }
     972    }
     973    else
     974    {
     975        WCHAR *pwszFilenameIgn;
     976        cwcInstallDir = GetFullPathNameW(papwszArgs[0], RT_ELEMENTS(wszInstallDir) - 1, wszInstallDir, &pwszFilenameIgn);
     977        if (cwcInstallDir == 0 || cwcInstallDir > RT_ELEMENTS(wszInstallDir) - 2)
     978            return ErrorMsgLastErrSWS("GetFullPathNameW failed for '", papwszArgs[0], "'!");
     979        if (!RTPATH_IS_SEP(wszInstallDir[cwcInstallDir - 1]))
     980        {
     981            wszInstallDir[cwcInstallDir++] = '\\';
     982            wszInstallDir[cwcInstallDir] = '\0';
     983        }
     984    }
     985
     986    /* Make sure we're on NT4 before continuing: */
     987    OSVERSIONINFO VerInfo = { sizeof(VerInfo) };
     988    GetVersionEx(&VerInfo);
     989    if (   VerInfo.dwPlatformId != VER_PLATFORM_WIN32_NT
     990        || VerInfo.dwMajorVersion != 4)
     991        return ErrorMsgSUSUS("This command is only for NT 4. GetVersionEx reports ", VerInfo.dwMajorVersion, ".",
     992                             VerInfo.dwMinorVersion, ".");
     993
     994    return (int)InstallNt4VideoDriver(wszInstallDir);
     995}
     996
     997
    630998
    631999/*********************************************************************************************************************************
     
    17732141             "    VBoxDrvInst driver uninstall <inf-file> [log-file]\r\n"
    17742142             "    VBoxDrvInst driver executeinf <inf-file>\r\n"
     2143             "    VBoxDrvInst driver nt4-install-video [install-dir]\r\n"
    17752144             "\r\n"
    17762145             "Service:\r\n"
     
    18162185    } s_aActions[] =
    18172186    {
    1818         { "driver",         "install",      1,  2, handleDriverInstall },
    1819         { "driver",         "uninstall",    1,  2, handleDriverUninstall },
    1820         { "driver",         "executeinf",   1,  1, handleDriverExecuteInf },
    1821         { "service",        "create",       5,  9, handleServiceCreate },
    1822         { "service",        "delete",       1,  1, handleServiceDelete },
    1823         { "netprovider",    "add",          1,  2, handleNetProviderAdd },
    1824         { "netprovider",    "remove",       1,  2, handleNetProviderRemove },
    1825         { "registry",       "addlistitem",  4,  6, handleRegistryAddListItem },
    1826         { "registry",       "dellistitem",  4,  4, handleRegistryDelListItem },
    1827         { "registry",       "addmultisz",   4,  4, handleRegistryAddMultiSz },
    1828         { "registry",       "delmultisz",   3,  3, handleRegistryDelMultiSz },
    1829         { "registry",       "write",        5,  7, handleRegistryWrite },
    1830         { "registry",       "delete",       3,  3, handleRegistryDelete },
    1831 
    1832         { "help",           NULL,           0, ~0U, handleHelp },
    1833         { "--help",         NULL,           0, ~0U, handleHelp },
    1834         { "/help",          NULL,           0, ~0U, handleHelp },
    1835         { "-h",             NULL,           0, ~0U, handleHelp },
    1836         { "/h",             NULL,           0, ~0U, handleHelp },
    1837         { "-?",             NULL,           0, ~0U, handleHelp },
    1838         { "/?",             NULL,           0, ~0U, handleHelp },
    1839         { "version",        NULL,           0, ~0U, handleVersion },
    1840         { "--version",      NULL,           0, ~0U, handleVersion },
    1841         { "-V",             NULL,           0, ~0U, handleVersion },
     2187        { "driver",         "install",              1,  2, handleDriverInstall },
     2188        { "driver",         "uninstall",            1,  2, handleDriverUninstall },
     2189        { "driver",         "executeinf",           1,  1, handleDriverExecuteInf },
     2190        { "driver",         "nt4-install-video",    0,  1, handleDriverNt4InstallVideo },
     2191        { "service",        "create",               5,  9, handleServiceCreate },
     2192        { "service",        "delete",               1,  1, handleServiceDelete },
     2193        { "netprovider",    "add",                  1,  2, handleNetProviderAdd },
     2194        { "netprovider",    "remove",               1,  2, handleNetProviderRemove },
     2195        { "registry",       "addlistitem",          4,  6, handleRegistryAddListItem },
     2196        { "registry",       "dellistitem",          4,  4, handleRegistryDelListItem },
     2197        { "registry",       "addmultisz",           4,  4, handleRegistryAddMultiSz },
     2198        { "registry",       "delmultisz",           3,  3, handleRegistryDelMultiSz },
     2199        { "registry",       "write",                5,  7, handleRegistryWrite },
     2200        { "registry",       "delete",               3,  3, handleRegistryDelete },
     2201
     2202        { "help",           NULL,                   0, ~0U, handleHelp },
     2203        { "--help",         NULL,                   0, ~0U, handleHelp },
     2204        { "/help",          NULL,                   0, ~0U, handleHelp },
     2205        { "-h",             NULL,                   0, ~0U, handleHelp },
     2206        { "/h",             NULL,                   0, ~0U, handleHelp },
     2207        { "-?",             NULL,                   0, ~0U, handleHelp },
     2208        { "/?",             NULL,                   0, ~0U, handleHelp },
     2209        { "version",        NULL,                   0, ~0U, handleVersion },
     2210        { "--version",      NULL,                   0, ~0U, handleVersion },
     2211        { "-V",             NULL,                   0, ~0U, handleVersion },
    18422212    };
    18432213
  • trunk/src/VBox/Additions/WINNT/Installer/VBoxGuestAdditionsCommon.nsh

    r96407 r96605  
    177177!if $%KBUILD_TARGET_ARCH% == "x86"
    178178  SetOutPath "$0\Tools\NT4"
    179   FILE "$%PATH_OUT%\bin\additions\VBoxGuestDrvInst.exe"
    180179  FILE "$%PATH_OUT%\bin\additions\RegCleanup.exe"
    181180!endif
  • trunk/src/VBox/Additions/WINNT/Installer/VBoxGuestAdditionsNT4.nsh

    r96407 r96605  
    123123
    124124  SetOutPath "$INSTDIR"
    125   FILE "$%PATH_OUT%\bin\additions\VBoxGuestDrvInst.exe"
    126   AccessControl::SetOnFile "$INSTDIR\VBoxGuestDrvInst.exe" "(BU)" "GenericRead"
    127125  FILE "$%PATH_OUT%\bin\additions\RegCleanup.exe"
    128126  AccessControl::SetOnFile "$INSTDIR\RegCleanup.exe" "(BU)" "GenericRead"
     
    175173
    176174  ; Video driver
    177   ${CmdExecute} "$\"$INSTDIR\VBoxGuestDrvInst.exe$\" /i" "false"
    178 
    179   ${LogVerbose} "Installing VirtualBox service ..."
     175  ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" driver nt4-install-video" "false"
    180176
    181177  ; Create the VBoxService service
    182178  ; No need to stop/remove the service here! Do this only on uninstallation!
     179  ${LogVerbose} "Installing VirtualBox service ..."
    183180  ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" service create $\"VBoxService$\" $\"VirtualBox Guest Additions Service$\" 16 2 $\"%SystemRoot%\system32\VBoxService.exe$\" $\"Base$\"" "false"
    184181
Note: See TracChangeset for help on using the changeset viewer.

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