VirtualBox

Changeset 68222 in vbox for trunk/src


Ignore:
Timestamp:
Aug 1, 2017 7:05:50 PM (7 years ago)
Author:
vboxsync
Message:

Main: Squeeze the validation kit and additions onto the aux image when installing windows vista+. Implemented setting up vboxtxs.

Location:
trunk/src/VBox/Main
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/UnattendedTemplates/win_nt6_unattended.xml

    r68149 r68222  
    88            publicKeyToken="31bf3856ad364e35" language="neutral"
    99            versionScope="nonSxS">
    10             <InputLocale>en-US</InputLocale>
    11             <SystemLocale>en-US</SystemLocale>
    12             <UILanguage>en-US</UILanguage>
    13             <UserLocale>en-US</UserLocale>
     10            <InputLocale>@@VBOX_INSERT_DASH_LOCALE@@</InputLocale>
     11            <SystemLocale>@@VBOX_INSERT_DASH_LOCALE@@</SystemLocale>
     12            <UILanguage>@@VBOX_INSERT_DASH_LOCALE@@</UILanguage>
     13            <UserLocale>@@VBOX_INSERT_DASH_LOCALE@@</UserLocale>
    1414        </component>
    1515
     
    117117                <SkipUserOOBE>true</SkipUserOOBE>
    118118                <SkipMachineOOBE>true</SkipMachineOOBE>
     119                <!-- Make this (NetworkLocation) default to public and make it configurable -->
    119120                <NetworkLocation>Home</NetworkLocation>
    120121            </OOBE>
     
    129130                    <Order>2</Order>
    130131                    <Description>VirtualBox post guest install steps </Description>
    131                     <CommandLine>cmd.exe /c A:\vboxpostinstall.cmd</CommandLine>
     132                    <CommandLine>cmd.exe /c A:\VBOXPOST.CMD</CommandLine>
    132133                </SynchronousCommand>
    133134            </FirstLogonCommands>
    134135
    135             <TimeZone>GMT Standard Time</TimeZone>
     136            <TimeZone>@@VBOX_INSERT_TIME_ZONE_WIN_NAME@@</TimeZone>
    136137        </component>
    137138
    138139    </settings>
    139140</unattend>
     141
  • trunk/src/VBox/Main/UnattendedTemplates/win_postinstall.cmd

    • Property svn:eol-style changed from LF to CRLF
    r68071 r68222  
    2020rem
    2121
     22rem Globals.
     23set MY_LOG_FILE=C:\vboxpostinstall.log
    2224
    23 echo TODO
     25rem Log header.
     26echo *** started >> %MY_LOG_FILE%
     27echo *** CD=%CD% >> %MY_LOG_FILE%
     28echo *** Environment BEGIN >> %MY_LOG_FILE%
     29set >> %MY_LOG_FILE%
     30echo *** Environment END >> %MY_LOG_FILE%
     31
    2432
    2533@@VBOX_COND_IS_INSTALLING_ADDITIONS@@
    26 e:\cert\VBoxCertUtil.exe add-trusted-publisher e:\cert\vbox*.cer --root e:\cert\vbox*.cer
    27 e:\VBoxWindowsAdditions.exe /S
     34rem
     35rem Install the guest additions.
     36rem
     37
     38rem First find the CDROM with the GAs on them.
     39set MY_VBOX_ADDITIONS=E:\vboxadditions
     40if exist %MY_VBOX_ADDITIONS%\VBoxWindowsAdditions.exe goto found_vbox_additions
     41set MY_VBOX_ADDITIONS=D:\vboxadditions
     42if exist %MY_VBOX_ADDITIONS%\VBoxWindowsAdditions.exe goto found_vbox_additions
     43set MY_VBOX_ADDITIONS=F:\vboxadditions
     44if exist %MY_VBOX_ADDITIONS%\VBoxWindowsAdditions.exe goto found_vbox_additions
     45set MY_VBOX_ADDITIONS=G:\vboxadditions
     46if exist %MY_VBOX_ADDITIONS%\VBoxWindowsAdditions.exe goto found_vbox_additions
     47set MY_VBOX_ADDITIONS=E:
     48if exist %MY_VBOX_ADDITIONS%\VBoxWindowsAdditions.exe goto found_vbox_additions
     49set MY_VBOX_ADDITIONS=F:
     50if exist %MY_VBOX_ADDITIONS%\VBoxWindowsAdditions.exe goto found_vbox_additions
     51set MY_VBOX_ADDITIONS=G:
     52if exist %MY_VBOX_ADDITIONS%\VBoxWindowsAdditions.exe goto found_vbox_additions
     53set MY_VBOX_ADDITIONS=D:
     54if exist %MY_VBOX_ADDITIONS%\VBoxWindowsAdditions.exe goto found_vbox_additions
     55set MY_VBOX_ADDITIONS=E:\vboxadditions
     56:found_vbox_additions
     57echo *** MY_VBOX_ADDITIONS=%MY_VBOX_ADDITIONS%\ >> %MY_LOG_FILE%
     58
     59rem Then add signing certificate to trusted publishers
     60echo *** Running: %MY_VBOX_ADDITIONS%\cert\VBoxCertUtil.exe ... >> %MY_LOG_FILE%
     61%MY_VBOX_ADDITIONS%\cert\VBoxCertUtil.exe add-trusted-publisher %MY_VBOX_ADDITIONS%\cert\vbox*.cer --root %MY_VBOX_ADDITIONS%\cert\vbox*.cer >> %MY_LOG_FILE% 2>&1
     62echo *** ERRORLEVEL: %ERRORLEVEL% >> %MY_LOG_FILE%
     63
     64rem Then do the installation.
     65echo *** Running: %MY_VBOX_ADDITIONS%\VBoxWindowsAdditions.exe /S >> %MY_LOG_FILE%
     66%MY_VBOX_ADDITIONS%\VBoxWindowsAdditions.exe /S
     67echo *** ERRORLEVEL: %ERRORLEVEL% >> %MY_LOG_FILE%
     68
    2869@@VBOX_COND_END@@
    2970
     71
     72@@VBOX_COND_IS_INSTALLING_TEST_EXEC_SERVICE@@
     73rem
     74rem Install the Test Execution service
     75rem
     76
     77rem First find the CDROM with the validation kit on it.
     78set MY_VBOX_VALIDATION_KIT=E:\vboxvalidationkit
     79if exist %MY_VBOX_VALIDATION_KIT%\vboxtxs-readme.txt goto found_vbox_validation_kit
     80set MY_VBOX_VALIDATION_KIT=D:\vboxvalidationkit
     81if exist %MY_VBOX_VALIDATION_KIT%\vboxtxs-readme.txt goto found_vbox_validation_kit
     82set MY_VBOX_VALIDATION_KIT=F:\vboxvalidationkit
     83if exist %MY_VBOX_VALIDATION_KIT%\vboxtxs-readme.txt goto found_vbox_validation_kit
     84set MY_VBOX_VALIDATION_KIT=G:\vboxvalidationkit
     85if exist %MY_VBOX_VALIDATION_KIT%\vboxtxs-readme.txt goto found_vbox_validation_kit
     86set MY_VBOX_VALIDATION_KIT=E:
     87if exist %MY_VBOX_VALIDATION_KIT%\vboxtxs-readme.txt goto found_vbox_validation_kit
     88set MY_VBOX_VALIDATION_KIT=F:
     89if exist %MY_VBOX_VALIDATION_KIT%\vboxtxs-readme.txt goto found_vbox_validation_kit
     90set MY_VBOX_VALIDATION_KIT=G:
     91if exist %MY_VBOX_VALIDATION_KIT%\vboxtxs-readme.txt goto found_vbox_validation_kit
     92set MY_VBOX_VALIDATION_KIT=D:
     93if exist %MY_VBOX_VALIDATION_KIT%\vboxtxs-readme.txt goto found_vbox_validation_kit
     94set MY_VBOX_VALIDATION_KIT=E:\vboxvalidationkit
     95:found_vbox_validation_kit
     96echo *** MY_VBOX_VALIDATION_KIT=%MY_VBOX_VALIDATION_KIT%\ >> %MY_LOG_FILE%
     97
     98rem Copy over the files.
     99echo *** Running: mkdir %SystemDrive%\Apps >> %MY_LOG_FILE%
     100mkdir %SystemDrive%\Apps >> %MY_LOG_FILE% 2>&1
     101echo *** ERRORLEVEL: %ERRORLEVEL% >> %MY_LOG_FILE%
     102
     103echo *** Running: copy %MY_VBOX_VALIDATION_KIT%\win\* %SystemDrive%\Apps >> %MY_LOG_FILE%
     104copy %MY_VBOX_VALIDATION_KIT%\win\* %SystemDrive%\Apps >> %MY_LOG_FILE% 2>&1
     105echo *** ERRORLEVEL: %ERRORLEVEL% >> %MY_LOG_FILE%
     106
     107echo *** Running: copy %MY_VBOX_VALIDATION_KIT%\win\%PROCESSOR_ARCHITECTURE%\* %SystemDrive%\Apps >> %MY_LOG_FILE%
     108copy %MY_VBOX_VALIDATION_KIT%\win\%PROCESSOR_ARCHITECTURE%\* %SystemDrive%\Apps >> %MY_LOG_FILE% 2>&1
     109echo *** ERRORLEVEL: %ERRORLEVEL% >> %MY_LOG_FILE%
     110
     111rem Update the registry to autorun the service and make sure we've got autologon.
     112echo *** Running: reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v NTConfiguration /d %SystemDrive%\Apps\vboxtxs.cmd >> %MY_LOG_FILE%
     113reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v NTConfiguration /d %SystemDrive%\Apps\vboxtxs.cmd >> %MY_LOG_FILE% 2>&1
     114echo *** ERRORLEVEL: %ERRORLEVEL% >> %MY_LOG_FILE%
     115
     116echo *** Running: reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon /v PowerdownAfterShutdown /d 1 >> %MY_LOG_FILE%
     117reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon /v PowerdownAfterShutdown /d 1 >> %MY_LOG_FILE% 2>&1
     118echo *** ERRORLEVEL: %ERRORLEVEL% >> %MY_LOG_FILE%
     119
     120echo *** Running: reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon /v ForceAutoLogon /d 1 >> %MY_LOG_FILE%
     121reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon /v ForceAutoLogon /d 1 >> %MY_LOG_FILE% 2>&1
     122echo *** ERRORLEVEL: %ERRORLEVEL% >> %MY_LOG_FILE%
     123rem  AutoAdminLogon too if administrator?
     124
     125rem Configure the firewall to allow TXS to listen.
     126echo *** Running: netsh firewall add portopening TCP 5048 "TestExecService 5048" >> %MY_LOG_FILE%
     127netsh firewall add portopening TCP 5048 "TestExecService 5048" >> %MY_LOG_FILE% 2>&1
     128echo *** ERRORLEVEL: %ERRORLEVEL% >> %MY_LOG_FILE%
     129
     130echo *** Running: netsh firewall add portopening TCP 5042 "TestExecService 5042" >> %MY_LOG_FILE%
     131netsh firewall add portopening TCP 5042 "TestExecService 5042" >> %MY_LOG_FILE% 2>&1
     132echo *** ERRORLEVEL: %ERRORLEVEL% >> %MY_LOG_FILE%
     133
     134@@VBOX_COND_END@@
     135
     136
     137@@VBOX_COND_HAS_POST_INSTALL_COMMAND@@
     138rem
     139rem Run user command.
     140rem
     141echo *** Running custom user command ... >> %MY_LOG_FILE%
     142echo *** Running: "@@VBOX_INSERT_POST_INSTALL_COMMAND@@" >> %MY_LOG_FILE%
     143@@VBOX_INSERT_POST_INSTALL_COMMAND@@
     144@@VBOX_COND_END@@
     145
     146echo *** done >> %MY_LOG_FILE%
     147
  • trunk/src/VBox/Main/include/UnattendedInstaller.h

    r68162 r68222  
    110110    virtual HRESULT initInstaller();
    111111
     112#if 0 /* These are now in the AUX VISO. */
    112113    /**
    113114     * Whether the VBox guest additions ISO is needed or not.
     
    125126     */
    126127    virtual bool isValidationKitIsoNeeded() const;
     128#endif
    127129
    128130    /**
     
    139141     * Indicates whether an additional or replacement ISO image is needed or not.
    140142     */
    141     virtual bool isAuxiliaryIsoNeeded() const       { return false; }
     143    virtual bool isAuxiliaryIsoNeeded() const;
     144
     145    /**
     146     * Indicates whether we should boot from the auxiliary ISO image.
     147     *
     148     * Will boot from installation ISO if false.
     149     */
     150    virtual bool bootFromAuxiliaryIso() const       { return isAuxiliaryIsoNeeded(); }
    142151
    143152    /**
     
    149158     * be remastered with small changes and additions.
    150159     */
    151     virtual bool isAuxiliaryIsoIsVISO() const       { return false; }
     160    virtual bool isAuxiliaryIsoIsVISO() const       { return true; }
    152161
    153162    /*
     
    355364        : UnattendedInstaller(pParent,
    356365                              "win_nt5_unattended.sif", "win_postinstall.cmd",
    357                               "WINNT.SIF",              "vboxpostinstall.cmd")
    358     { Assert(isOriginalIsoNeeded()); Assert(isAuxiliaryFloppyNeeded());  Assert(!isAuxiliaryIsoNeeded()); }
     366                              "WINNT.SIF",              "VBOXPOST.CMD")
     367    { Assert(isOriginalIsoNeeded()); Assert(isAuxiliaryFloppyNeeded()); Assert(isAuxiliaryIsoIsVISO()); Assert(!bootFromAuxiliaryIso()); }
    359368    ~UnattendedWindowsSifInstaller()        {}
    360369
    361370    bool isAuxiliaryFloppyNeeded() const    { return true; }
     371    bool bootFromAuxiliaryIso() const       { return false; }
     372
    362373};
    363374
     
    371382        : UnattendedInstaller(pParent,
    372383                              "win_nt6_unattended.xml", "win_postinstall.cmd",
    373                               "autounattend.xml",       "vboxpostinstall.cmd")
    374     { Assert(isOriginalIsoNeeded()); Assert(isAuxiliaryFloppyNeeded());  Assert(!isAuxiliaryIsoNeeded()); }
     384                              "autounattend.xml",       "VBOXPOST.CMD")
     385    { Assert(isOriginalIsoNeeded()); Assert(isAuxiliaryFloppyNeeded()); Assert(isAuxiliaryIsoIsVISO()); Assert(!bootFromAuxiliaryIso()); }
    375386    ~UnattendedWindowsXmlInstaller()      {}
    376387
    377388    bool isAuxiliaryFloppyNeeded() const    { return true; }
     389    bool bootFromAuxiliaryIso() const       { return false; }
    378390};
    379391
     
    399411
    400412    bool isAuxiliaryIsoNeeded() const       { return true; }
    401     bool isAuxiliaryIsoIsVISO() const       { return true; }
    402413
    403414protected:
  • trunk/src/VBox/Main/src-server/UnattendedImpl.cpp

    r68170 r68222  
    826826    if (mpInstaller->isOriginalIsoNeeded())
    827827        cDvdDrivesNeeded++;
     828#if 0 /* These are now in the AUX VISO. */
    828829    if (mpInstaller->isAdditionsIsoNeeded())
    829830        cDvdDrivesNeeded++;
    830831    if (mpInstaller->isValidationKitIsoNeeded())
    831832        cDvdDrivesNeeded++;
     833#endif
    832834    Assert(cDvdDrivesNeeded > 0);
    833835    if (cDvdDrivesNeeded > lstControllerDvdSlots.size())
     
    878880     * Prepare ISO mounts.
    879881     *
    880      * ASSUMES the auxiliary ISO is bootable if present.  ASSUMES the original
    881      * ISO is bootable if no auxiliary ISO present.  These two assumptions is
    882      * reflected in the order we grab DVD slots.
     882     * Boot order depends on bootFromAuxiliaryIso() and we must grab DVD slots
     883     * according to the boot order.
    883884     */
    884885    std::list<ControllerSlot>::const_iterator itDvdSlot = lstControllerDvdSlots.begin();
    885     if (mpInstaller->isAuxiliaryIsoNeeded())
     886    if (mpInstaller->isAuxiliaryIsoNeeded() && mpInstaller->bootFromAuxiliaryIso())
    886887    {
    887888        rVecInstallatationDisks.push_back(UnattendedInstallationDisk(itDvdSlot, mpInstaller->getAuxiliaryIsoFilePath()));
     
    895896    }
    896897
     898    if (mpInstaller->isAuxiliaryIsoNeeded() && !mpInstaller->bootFromAuxiliaryIso())
     899    {
     900        rVecInstallatationDisks.push_back(UnattendedInstallationDisk(itDvdSlot, mpInstaller->getAuxiliaryIsoFilePath()));
     901        ++itDvdSlot;
     902    }
     903
     904#if 0 /* These are now in the AUX VISO. */
    897905    if (mpInstaller->isAdditionsIsoNeeded())
    898906    {
     
    906914        ++itDvdSlot;
    907915    }
     916#endif
    908917
    909918    return S_OK;
  • trunk/src/VBox/Main/src-server/UnattendedInstaller.cpp

    r68162 r68222  
    187187}
    188188
     189#if 0  /* Always in AUX ISO */
    189190bool UnattendedInstaller::isAdditionsIsoNeeded() const
    190191{
     
    198199    return !isAuxiliaryIsoIsVISO() && mpParent->i_getInstallTestExecService();
    199200}
     201#endif
     202
     203bool UnattendedInstaller::isAuxiliaryIsoNeeded() const
     204{
     205    /* In the VISO case we use the AUX ISO for GAs and TXS. */
     206    return isAuxiliaryIsoIsVISO()
     207        && (   mpParent->i_getInstallGuestAdditions()
     208            || mpParent->i_getInstallTestExecService());
     209}
     210
    200211
    201212HRESULT UnattendedInstaller::prepareUnattendedScripts()
  • trunk/src/VBox/Main/src-server/UnattendedScript.cpp

    r68164 r68222  
    559559    else if (IS_PLACEHOLDER_MATCH("LOCALE"))
    560560        rValue = mpUnattended->i_getLocale();
     561    else if (IS_PLACEHOLDER_MATCH("DASH_LOCALE"))
     562    {
     563        rValue = mpUnattended->i_getLocale();
     564        Assert(rValue[2] == '_');
     565        rValue.replace(2, 1, "-");
     566    }
    561567    else if (IS_PLACEHOLDER_MATCH("COUNTRY"))
    562568        rValue = mpUnattended->i_getCountry();
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