To perform a non-interactive installation of Oracle VM VirtualBox you can use the command line version of the installer application.
Mount the
hdiutil attach /path/to/VirtualBox-xyz.dmg
Open a terminal session and run the following command:
sudo installer -pkg /Volumes/VirtualBox/VirtualBox.pkg -target /Volumes/Macintosh\ HD