VirtualBox

Ignore:
Timestamp:
Nov 8, 2024 4:39:19 PM (3 months ago)
Author:
vboxsync
Message:

Windows Guest Additions: Renamed VBoxDrvInst.exe -> VBoxGuestInstallHelper.exe. Marked the 'driver [...]' commands as being deprecated. bugref:10762

File:
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Installer/InstallHelper/VBoxGuestInstallHelper.cpp

    r106895 r106896  
    11/* $Id$ */
    22/** @file
    3  * VBoxDrvInst - Driver and service installation helper for Windows guests.
     3 * VBoxGuestInstallHelper - Driver and service installation helper for Windows guests.
    44 */
    55
     
    5959#include <iprt/string.h>
    6060#include <iprt/system.h>
     61#include <iprt/thread.h> /* For RTThreadSleep(). */
    6162#include <iprt/utf16.h>
    6263
     
    594595}
    595596
     597/**
     598 * Shows a deprecation notice for a command.
     599 *
     600 * @param   pszCmd              Command which is deprecated.
     601 */
     602static void showCmdDeprecationNotice(const char *pszCmd)
     603{
     604    PrintStr("!!! Deprecation Notice !!!\n");
     605    PrintSSS("\tThe command \"", pszCmd, "\" is deprecated, is not supported anymore\n");
     606    PrintStr("\tand will be removed in a future version.\n");
     607    PrintStr("!!! Deprecation Notice !!!\n\n");
     608    PrintStr("Please use VBoxGuestInstallHelper.exe instead.\n\n");
     609
     610    RTThreadSleep(RT_MS_10SEC); /* Make it painful to use. */
     611}
     612
    596613/** Handles 'driver install'. */
    597614static int handleDriverInstall(unsigned cArgs, wchar_t **papwszArgs)
    598615{
     616    showCmdDeprecationNotice("install");
     617
    599618    char *pszInfFile = NULL;
    600619    int rc = RTUtf16ToUtf8(papwszArgs[0], &pszInfFile);
     
    637656static int handleDriverUninstall(unsigned cArgs, wchar_t **papwszArgs)
    638657{
     658    showCmdDeprecationNotice("uninstall");
     659
    639660    char *pszInfFile = NULL;
    640661    int rc = RTUtf16ToUtf8(papwszArgs[0], &pszInfFile);
     
    683704static int handleDriverExecuteInf(unsigned cArgs, wchar_t **papwszArgs)
    684705{
     706    showCmdDeprecationNotice("executeinf");
     707
    685708    char *pszInfFile = NULL;
    686709    int rc = RTUtf16ToUtf8(papwszArgs[0], &pszInfFile);
     
    22192242             "Version: " RT_XSTR(VBOX_VERSION_MAJOR) "." RT_XSTR(VBOX_VERSION_MINOR) "." RT_XSTR(VBOX_VERSION_BUILD) "r" RT_XSTR(VBOX_SVN_REV) "\r\n"
    22202243             "\r\n"
    2221              "Syntax: VBoxDrvInst <command> <subcommand>\r\n"
     2244             "Syntax: VBoxGuestInstallHelper <command> <subcommand>\r\n"
    22222245             "\r\n"
    22232246             "Drivers:\r\n"
    2224              "    VBoxDrvInst driver install <inf-file> [pnp-id] [log-file]\r\n"
    2225              "    VBoxDrvInst driver uninstall <inf-file> <model> [pnp-id] [log-file]\r\n"
    2226              "    VBoxDrvInst driver executeinf <inf-file> [section]\r\n"
    2227              "    VBoxDrvInst driver nt4-install-video [install-dir]\r\n"
     2247             "    VBoxGuestInstallHelper driver install <inf-file> [pnp-id] [log-file]\r\n"
     2248             "    VBoxGuestInstallHelper driver uninstall <inf-file> <model> [pnp-id] [log-file]\r\n"
     2249             "    VBoxGuestInstallHelper driver executeinf <inf-file> [section]\r\n"
     2250             "    VBoxGuestInstallHelper driver nt4-install-video [install-dir]\r\n"
    22282251             "\r\n"
    22292252             "Service:\r\n"
    2230              "    VBoxDrvInst service create <name> <display-name> <service-type>\r\n"
     2253             "    VBoxGuestInstallHelper service create <name> <display-name> <service-type>\r\n"
    22312254             "        <start-type> <binary-path> [load-order] [deps] [user] [password]\r\n"
    2232              "    VBoxDrvInst service delete <name>\r\n"
     2255             "    VBoxGuestInstallHelper service delete <name>\r\n"
    22332256             "\r\n"
    22342257             "Network Provider:\r\n"
    2235              "    VBoxDrvInst netprovider add <name> <position>\r\n"
    2236              "    VBoxDrvInst netprovider remove <name>\r\n"
     2258             "    VBoxGuestInstallHelper netprovider add <name> <position>\r\n"
     2259             "    VBoxGuestInstallHelper netprovider remove <name>\r\n"
    22372260             "\r\n"
    22382261             "Registry:\r\n"
    2239              "    VBoxDrvInst registry write <root> <sub-key> <value-name> <type> <value>\r\n"
     2262             "    VBoxGuestInstallHelper registry write <root> <sub-key> <value-name> <type> <value>\r\n"
    22402263             "        [binary-conversion] [max-size]\r\n"
    2241              "    VBoxDrvInst registry delete <root> <sub-key> <value-name>\r\n"
     2264             "    VBoxGuestInstallHelper registry delete <root> <sub-key> <value-name>\r\n"
    22422265             /** @todo Add roots for these two. */
    2243              "    VBoxDrvInst registry addmultisz <sub-key> <value-name> <to-add> <position>\r\n"
    2244              "    VBoxDrvInst registry delmultisz <sub-key> <value-name> <to-remove>\r\n"
    2245              "    VBoxDrvInst registry addlistitem <root> <sub-key> <value-name> <to-add>\r\n"
     2266             "    VBoxGuestInstallHelper registry addmultisz <sub-key> <value-name> <to-add> <position>\r\n"
     2267             "    VBoxGuestInstallHelper registry delmultisz <sub-key> <value-name> <to-remove>\r\n"
     2268             "    VBoxGuestInstallHelper registry addlistitem <root> <sub-key> <value-name> <to-add>\r\n"
    22462269             "        [position [dup|no-dup]]\r\n"
    2247              "    VBoxDrvInst registry dellistitem <root> <sub-key> <value-name> <to-remove>\r\n"
     2270             "    VBoxGuestInstallHelper registry dellistitem <root> <sub-key> <value-name> <to-remove>\r\n"
    22482271             "\r\n"
    22492272             "Standard options:\r\n"
    2250              "    VBoxDrvInst [help|--help|/help|-h|/h|-?|/h] [...]\r\n"
    2251              "    VBoxDrvInst [version|--version|-V]\r\n"
     2273             "    VBoxGuestInstallHelper [help|--help|/help|-h|/h|-?|/h] [...]\r\n"
     2274             "    VBoxGuestInstallHelper [version|--version|-V]\r\n"
    22522275             );
    22532276    RT_NOREF(cArgs, papwszArgs);
     
    22702293    } s_aActions[] =
    22712294    {
    2272         { "driver",         "install",              1,  3, handleDriverInstall },
    2273         { "driver",         "uninstall",            2,  4, handleDriverUninstall },
    2274         { "driver",         "executeinf",           1,  3, handleDriverExecuteInf },
     2295        { "driver",         "install",              1,  3, handleDriverInstall },    /* Deprecated */
     2296        { "driver",         "uninstall",            2,  4, handleDriverUninstall },  /* Deprecated */
     2297        { "driver",         "executeinf",           1,  3, handleDriverExecuteInf }, /* Deprecated */
    22752298        { "driver",         "nt4-install-video",    0,  1, handleDriverNt4InstallVideo },
    22762299        { "service",        "create",               5,  9, handleServiceCreate },
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