Difference between revisions of "Sun xVM VirtualBox"
(→VirtualBox Extension Pack) |
|||
Line 127: | Line 127: | ||
== VirtualBox Extension Pack== | == VirtualBox Extension Pack== | ||
− | It can be installed by using the following command, but therefor you always have to update the licente code. You get the licence code by executing the command without the accept-license parameter in a Windows command line window. | + | Since VirtualBox 5.1.20 requires acceptance of license terms. It can be installed by using the following command, but therefor you always have to update the licente code. You get the licence code by executing the command without the accept-license parameter in a Windows command line window. |
<source lang="xml"> | <source lang="xml"> | ||
Line 145: | Line 145: | ||
echo y | "%PROGRAMFILES%\Oracle\VirtualBox\VBoxManage.exe" extpack install --replace "%1" >NUL | echo y | "%PROGRAMFILES%\Oracle\VirtualBox\VBoxManage.exe" extpack install --replace "%1" >NUL | ||
</source> | </source> | ||
− | |||
[[category:Silent Installers]] | [[category:Silent Installers]] |
Revision as of 14:48, 19 March 2018
This is a silent installer for Sun xVM VirtualBox. You can get it from VirtualBox Homepage.
See http://www.virtualbox.org/manual/ch02.html#idp50342400 for installation advice.
Contents
VirtualBox 5.0.14
I use the --extract switch to extract the MSI files. Then I extract the VBoxGuestAdditions.iso from the common.cab file. I extract the VBoxGuestAdditions.iso to find the updated certificate file. In order to install the new extensions file it is best to uninstall the old as --replace frequently gives an error. You also have to copy the extensions file to the local hard disk to install as it has to extract as part of the process and you won't allow your WPKG user to write to your network %SOFTWARE% share point.
<package id="virtualbox"
name="Oracle Virtual Box"
revision="%version%"
reboot="false"
priority="1">
<depends package-id="netinstfolder"/><!--for log file-->
<variable name="version" value="5.0.14" />
<variable name="release" value="105127" />
<variable architecture="x86" name="PRODUCT_CODE" value="{8F6D5610-B5D2-4CF3-90ED-584ABC8B946A}" /> <!-- this changes every version -->
<variable architecture="x64" name="PRODUCT_CODE" value="{82022940-639B-48A3-86D9-B139864105F7}" /> <!-- this changes every version -->
<check type="uninstall" condition="versionequalto" path="Oracle VM VirtualBox %version%" value="%version%"/>
<install cmd='certutil.exe -f -addstore "TrustedPublisher" "%SOFTWARE%\virtualbox\virtualbox.%version%\oracle-vbox.cer"'/>
<install architecture="x86" cmd='msiexec /i "%SOFTWARE%\virtualbox\virtualbox.%version%\VirtualBox-%version%-r%release%-MultiArch_x86.msi" ADDLOCAL=VBoxApplication,VBoxUSB,VBoxNetwork /qn /norestart /l*v "%systemdrive%\netinst\virtualbox.log" ' ></install>
<install architecture="x64" cmd='msiexec /i "%SOFTWARE%\virtualbox\virtualbox.%version%\VirtualBox-%version%-r%release%-MultiArch_amd64.msi" ADDLOCAL=VBoxApplication,VBoxUSB,VBoxNetwork /qn /norestart /l*v "%systemdrive%\netinst\virtualbox.log" ' ></install>
<install cmd='%comspec% /c copy /y %SOFTWARE%\virtualbox\virtualbox.%version%\oracle_vm_virtualbox_extension_pack-%VERSION%-%RELEASE%.vbox-extpack c:\netinst ' />
<install cmd='%Programfiles%\Oracle\VirtualBox\vboxmanage.exe extpack install c:\netinst\oracle_vm_virtualbox_extension_pack-%VERSION%-%RELEASE%.vbox-extpack ' />
<upgrade cmd='%Programfiles%\Oracle\VirtualBox\vboxmanage.exe extpack uninstall "Oracle VM VirtualBox Extension Pack" ' />
<upgrade include='install' />
<remove cmd='%Programfiles%\Oracle\VirtualBox\vboxmanage.exe extpack uninstall "Oracle VM VirtualBox Extension Pack" ' />
<remove cmd='MsiExec.exe /X%PRODUCT_CODE% /qn' />
<remove cmd='cmd /c rmdir /s /q "%PROGRAMFILES%\Oracle\VirtualBox\ExtensionPacks" ' ><exit code='any'/></remove>
</package>
VirtualBox 4.3.6
There's a --silent switch now which seems to work, something like this:
<package id="virtualbox"
name="Oracle Virtual Box"
revision="%version%"
reboot="false"
priority="0">
<variable name="version" value="4.3.6" />
<variable name="longversion" value="4.3.6-91406" />
<check type="uninstall" condition="exists" path="Oracle VM VirtualBox %version%" />
<install cmd='"%SOFTWARE%\virtualbox\VirtualBox-%longversion%-Win.exe" --silent '></install>
<remove architecture="x86" cmd='MsiExec.exe /X{F20386D5-EE47-42FF-90CB-203A61787CA2} /qn' />
<remove architecture="x64" cmd='MsiExec.exe /X{B374E6A8-501F-4BC0-BA59-4EE78F06B3B2} /qn' />
</package>
VirtualBox 4.1.10
Using certutil.exe allows you to approve the use of USB devices without manual validation.
<package id="virtualbox"
name="Oracle Virtual Box"
revision="4.1.10"
reboot="false"
priority="1">
<check type="uninstall" condition="exists" path="Oracle VM VirtualBox 4.1.10" />
<install architecture="x86" os="windows.+5\.\d{1}\.\d{4}" cmd='msiexec /i "%SOFTWARE%\virtualbox\virbox4110\VirtualBox-4.1.10-r76836-MultiArch_x86.msi" ADDLOCAL=VBoxApplication,VBoxUSB /qn /norestart /l*v "%systemdrive%\netinst\virtualbox.log" ' ></install>
<install architecture="x86" os="windows.+6\.\d{1}\.\d{4}" cmd='certutil.exe -f -addstore "TrustedPublisher" "%SOFTWARE%\virtualbox\virbox4110\virboxusbcerI386.cer"'/>
<install architecture="x86" os="windows.+6\.\d{1}\.\d{4}" cmd='msiexec /i "%SOFTWARE%\virtualbox\virbox4110\VirtualBox-4.1.10-r76836-MultiArch_x86.msi" ADDLOCAL=VBoxApplication,VBoxUSB /qn /norestart /l*v "%systemdrive%\netinst\virtualbox.log" ' ></install>
<install architecture="x64" os="windows.+6\.\d{1}\.\d{4}" cmd='certutil.exe -f -addstore "TrustedPublisher" "%SOFTWARE%\virtualbox\virbox4110\virboxusbcerX64.cer"'/>
<install architecture="x64" os="windows.+6\.\d{1}\.\d{4}" cmd='msiexec /i "%SOFTWARE%\virtualbox\virbox4110\VirtualBox-4.1.10-r76836-MultiArch_amd64.msi" ADDLOCAL=VBoxApplication,VBoxUSB /qn /norestart /l*v "%systemdrive%\netinst\virtualbox.log" ' ></install>
<remove architecture="x86" os="windows.+6\.\d{1}\.\d{4}" cmd='MsiExec.exe /X{F20386D5-EE47-42FF-90CB-203A61787CA2} /qn' />
<remove architecture="x86" os="windows.+5\.\d{1}\.\d{4}" cmd='MsiExec.exe /X{F20386D5-EE47-42FF-90CB-203A61787CA2} /qn' />
<remove architecture="x64" os="windows.+6\.\d{1}\.\d{4}" cmd='MsiExec.exe /X{B374E6A8-501F-4BC0-BA59-4EE78F06B3B2} /qn' />
</package>
VirtualBox 2.1.4
The user will have to manually validate the installation of new drivers (until someone find how to fix it).
<?xml version="1.0" encoding="UTF-8"?>
<packages>
<package
id="virtualbox"
name="Virtualbox"
revision="0214"
reboot="false"
priority="10">
<check type="uninstall" condition="exists" path="Sun xVM VirtualBox" />
<check type="file" condition="sizeequals" path="%PROGRAMFILES%\Sun xVM VirtualBox\VirtualBox.exe" value="3025424" />
<install cmd='msiexec /i "%SOFTWARE%\virtualbox\VirtualBox-2.1.4-42893-Win_x86.msi" /qn /norestart'>
<exit code="1618" />
<exit code="0" />
</install>
<upgrade cmd='msiexec /i "%SOFTWARE%\virtualbox\VirtualBox-2.1.4-42893-Win_x86.msi" /qn /norestart'>
<exit code="1618" />
<exit code="0" />
</upgrade>
</package>
</packages>
Needed : a way to silently install the network driver that is provided by this package. Any help appreciated. As for now, it is still asked to the user to acknowledge the installation of the network device driver.
See here OpenVPN. --Blank3 09:18, 26 February 2009 (CET)
To silently install a driver, it must come from a trusted source, i.e. we have to install the oracle certificate first. Details are to be found at http://www.win-lite.de/wbb/board195-windows-7/board196-win7-tools-zur-image-bearbeitung/3987-howto-programme-ohne-treibernachfrage-in-windows7-silent-installieren/
<?xml version="1.0" encoding="UTF-8"?>
<packages>
<package id="virtualbox" name="Virtualbox" reboot="false" priority="10">
<check type="file" condition="versiongreaterorequal" path="%PROGRAMFILES%\Oracle\VirtualBox\VirtualBox.exe" value="4.1.8.0"/>
<install cmd="certutil.exe -f -addstore "TrustedPublisher" %SOFTWARE%\virtualBox\oracle.p7b"/>
<install cmd="%SOFTWARE%\virtualBox\virtualBox-4.1.8-75467-win.exe -s"/>
</package>
</packages>
VirtualBox Extension Pack
Since VirtualBox 5.1.20 requires acceptance of license terms. It can be installed by using the following command, but therefor you always have to update the licente code. You get the licence code by executing the command without the accept-license parameter in a Windows command line window.
<install timeout='30' cmd='"%PROGRAMFILES%\Oracle\VirtualBox\VBoxManage.exe" extpack install --replace "%SOFTWARE%\VirtualBox\Oracle_VM_VirtualBox_Extension_Pack-%version%.vbox-extpack" --accept-license=715c7246dc0f779ceab39446812362b2f9bf64a55ed5d3a905f053cfab36da9e' />
The better solution is to use the following command:
<install timeout='30' cmd='"%SOFTWARE%\VirtualBox\InstallExtPack.cmd" "%SOFTWARE%\VirtualBox\Oracle_VM_VirtualBox_Extension_Pack-%version%.vbox-extpack"' />
and a cmd script which sends the key "y" to the question if one is accepting the extension pack licence agreement. The redirection >NUL is needed - without it, it always failed for me.
@echo off
echo y | "%PROGRAMFILES%\Oracle\VirtualBox\VBoxManage.exe" extpack install --replace "%1" >NUL