Standard msi install with /qb (for a quiet install using basic progress dialog) works fine. However, you'll need to create a "%USERPROFILE%\.VirtualBox" directory containing a VirtualBox.xml file (copy one created after first-use) but using the following values in the ExtraData XML section:
If you want to do it all from 1 script, use the following, this assumes the original VirtualBox exe package downloaded from the website is in the same directory as this script.
FOR /F %%i in ('dir /b %~dp0VirtualBox-*.exe') DO (
:: Extract the MSI and cab files
START %~dp0%%i -x -p .
:: let's wait for 5 seconds
CALL ping -n 5 127.0.0.1
:: kill the virtualbox exe package, killing the popup
CALL taskkill /IM %%i
:: When there's no ProgramFiles(x86) environment var
:: it's safe to assume that this is a 32-bit system
FOR /F %%a in ('dir /b VirtualBox-*_x86.msi') DO (
IF NOT DEFINED ProgramFiles(x86) CALL %%a /qb-!
:: When there IS a ProgramFiles(x86) environment var
:: it's safe to assume that this is 64-bit system
FOR /F %%b in ('dir /b VirtualBox-*_amd64.msi') DO (
IF DEFINED ProgramFiles(x86) CALL %%b /qb-!