VirtualBox

Changeset 51126 in vbox


Ignore:
Timestamp:
Apr 23, 2014 3:19:32 PM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
93431
Message:

VBoxStub: Added "--reinstall" switch to force re-installation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Installer/win/Stub/VBoxStub.cpp

    r49039 r51126  
    55
    66/*
    7  * Copyright (C) 2010-2013 Oracle Corporation
     7 * Copyright (C) 2010-2014 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    820820    static const RTGETOPTDEF s_aOptions[] =
    821821    {
     822        /** @todo Replace short parameters with enums since they're not
     823         *        used (and not documented to the public). */
    822824        { "--extract",          'x', RTGETOPT_REQ_NOTHING },
    823825        { "-extract",           'x', RTGETOPT_REQ_NOTHING },
     
    839841        { "--msiparams",        'm', RTGETOPT_REQ_STRING  },
    840842        { "-msiparams",         'm', RTGETOPT_REQ_STRING  },
     843        { "--reinstall",        "f", RTGETOPT_REQ_NOTHING },
     844        { "-reinstall",         "f", RTGETOPT_REQ_NOTHING },
     845        { "/reinstall",         "f", RTGETOPT_REQ_NOTHING },
    841846        { "--version",          'V', RTGETOPT_REQ_NOTHING },
    842847        { "-version",           'V', RTGETOPT_REQ_NOTHING },
     
    858863        switch (ch)
    859864        {
     865            case 'f': /* Force re-installation. */
     866                if (szMSIArgs[0])
     867                    vrc = RTStrCat(szMSIArgs, sizeof(szMSIArgs), " ");
     868                if (RT_SUCCESS(vrc))
     869                    vrc = RTStrCat(szMSIArgs, sizeof(szMSIArgs),
     870                                   "REINSTALLMODE=vomus REINSTALL=ALL");
     871                if (RT_FAILURE(vrc))
     872                    return ShowError("MSI parameters are too long.");
     873                break;
     874
    860875            case 'x':
    861876                fExtractOnly = true;
     
    900915                         "\n"
    901916                         "Command Line Parameters:\n\n"
     917                         "--help                   - Print this help and exit\n"
    902918                         "--extract                - Extract file contents to temporary directory\n"
    903                          "--silent                 - Enables silent mode installation\n"
     919                         "--logging                - Enables installer logging\n"
     920                         "--msiparams <parameters> - Specifies extra parameters for the MSI installers\n"
    904921                         "--no-silent-cert         - Do not install VirtualBox Certificate automatically when --silent option is specified\n"
    905922                         "--path                   - Sets the path of the extraction directory\n"
    906                          "--msiparams <parameters> - Specifies extra parameters for the MSI installers\n"
    907                          "--logging                - Enables installer logging\n"
    908                          "--help                   - Print this help and exit\n"
     923                         "--reinstall              - Forces VirtualBox to get re-installed\n"
     924                         "--silent                 - Enables silent mode installation\n"
    909925                         "--version                - Print version number and exit\n\n"
    910926                         "Examples:\n"
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