At first, the unattended deployment of VirtualBox might sound quite complicated, because the installer needs to set up drivers and do quite a bit of complicated stuff. Additionally, the installer of VirtualBox offered on the website is an EXE file and not a convenient MSI file.
But overall, it is quite simple to do an unattended installation of virtualbox. With a little bit of googling you can find this excellent guide on the VirtualBox website. Then, the steps are simple:
- Download the latest version from the VirtualBox website.
- Fortunately, the EXE file is just a wrapper for a MSI. Just run:
VirtualBox.exe -extract
(adjust the filename as needed). After a short time, a dialog box will tell you where the MSIs (for x64 and x86) has been extracted to. - Now comes the tricky part. VirtualBox will install some drivers that are signed with a certificate that Windows does not trust by default. Thus, a prompt will apear during the installation. The trick is to import the certificates into the certificate store before installation:
- Install VirtualBox on your computer. When a driver prompt appears, be sure to check the box "Always trust Content" and click "Install".
- After the installation has finished, start
certmgr.msc
and navigate to "Trusted Publishers". Export every certificate that has "Oracle" or "Sun" in its name to a path of your choice. - Distribute the exported certificates with the MSI files from above.
- For the installation, run the following command for each of the certificates you have exported above:
certutil -addstore "TrustedPublisher" oracle.cer
- Then, run the installation like a normal MSI:
msiexec /i Virtualbox.msi /passive
In my case, I created a small batch file that installed the certificates and then imported it into MDT. Works like a charm!