VirtualBox

Changeset 45572 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Apr 16, 2013 1:15:11 PM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
85063
Message:

GuestSessionImplTasks.cpp: Better Windows OS version detection for automatic updates.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/GuestSessionImplTasks.cpp

    r45482 r45572  
    11251125                /* Windows XP 64-bit (5.2) is a Windows 2003 Server actually, so skip this here. */
    11261126                if (   RT_SUCCESS(rc)
    1127                     && (   strOSVer.startsWith("5.0")  /* Exclude the build number. */
    1128                         || strOSVer.startsWith("5.1")) /* Exclude the build number. */
    1129                    )
    1130                 {
    1131                     /* If we don't have AdditionsUpdateFlag_WaitForUpdateStartOnly set we can't continue
    1132                      * because the Windows Guest Additions installer will fail because of WHQL popups. If the
    1133                      * flag is set this update routine ends successfully as soon as the installer was started
    1134                      * (and the user has to deal with it in the guest). */
    1135                     if (!(mFlags & AdditionsUpdateFlag_WaitForUpdateStartOnly))
     1127                    && RTStrVersionCompare(strOSVer.c_str(), "5.0") >= 0)
     1128                {
     1129                    if (   strOSVer.startsWith("5.0") /* Exclude the build number. */
     1130                        || strOSVer.startsWith("5.1") /* Exclude the build number. */)
    11361131                    {
    1137                         hr = setProgressErrorMsg(VBOX_E_NOT_SUPPORTED,
    1138                                                  Utf8StrFmt(GuestSession::tr("Windows 2000 and XP are not supported for automatic updating due to WHQL interaction, please update manually")));
    1139                         rc = VERR_NOT_SUPPORTED;
     1132                        /* If we don't have AdditionsUpdateFlag_WaitForUpdateStartOnly set we can't continue
     1133                         * because the Windows Guest Additions installer will fail because of WHQL popups. If the
     1134                         * flag is set this update routine ends successfully as soon as the installer was started
     1135                         * (and the user has to deal with it in the guest). */
     1136                        if (!(mFlags & AdditionsUpdateFlag_WaitForUpdateStartOnly))
     1137                        {
     1138                            hr = setProgressErrorMsg(VBOX_E_NOT_SUPPORTED,
     1139                                                     Utf8StrFmt(GuestSession::tr("Windows 2000 and XP are not supported for automatic updating due to WHQL interaction, please update manually")));
     1140                            rc = VERR_NOT_SUPPORTED;
     1141                        }
    11401142                    }
     1143                }
     1144                else
     1145                {
     1146                    hr = setProgressErrorMsg(VBOX_E_NOT_SUPPORTED,
     1147                                             Utf8StrFmt(GuestSession::tr("%s (%s) not supported for automatic updating, please update manually"),
     1148                                                        strOSType.c_str(), strOSVer.c_str()));
     1149                    rc = VERR_NOT_SUPPORTED;
    11411150                }
    11421151            }
     
    11491158
    11501159#if 1 /* Only Windows is supported (and tested) at the moment. */
    1151             if (osType != eOSType_Windows)
     1160            if (   RT_SUCCESS(rc)
     1161                && osType != eOSType_Windows)
    11521162            {
    11531163                hr = setProgressErrorMsg(VBOX_E_NOT_SUPPORTED,
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