Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm making an unattended install of windows. Part of it is installing virtualbox guest additions, which is run by the installer due to the following entry in Autounattend.xml:

<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
  <settings pass="oobeSystem">
    <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="NonSxS" xmlns:wcm="" xmlns:xsi="">
          <Description>VirtualBox Additions</Description>
          <CommandLine>F:\VBoxWindowsAdditions-x86.exe /S</CommandLine>

It runs fine, installing with no GUI. However, two windows pop up asking whether to install two device drivers. This does not bode well for an automated install. Is there any way to force win7 to accept the drivers, or a registry key I can set to make it trust them?

share|improve this question

Your best shot at avoiding those prompts is to grab the required certificates the device drivers are signed with and install those on the guest prior to installation. You can find a certificate for Sun and one for Oracle in the Local Computer -> Trusted Publisher certificate store. You can easily export them from there and then import them into the guest prior to installing the additions.

To extract the certificate from a machine that already has installed and trusted the certificate(s) used for signing the device drivers using PowerShell:

cd cert:\LocalMachine\TrustedPublisher
$cert = dir | where { $_.Subject -like "*Oracle*" }
$type = [System.Security.Cryptography.X509Certificates.X509ContentType]::Cert
$bytes = $cert.Export($type)
[System.IO.File]::WriteAllBytes("C:\Oracle.cer", $bytes)

You may want to run the above command and replace *Oracle* with *Sun Microsystems* and capture both certificates, so they can both be present so you can be a bit more version independent with VirtualBox. Just make sure these certificates are installed prior to your unattended installation of the guest additions.

share|improve this answer
More info about this approach at… – John May 26 '12 at 8:39

To add to @Goyuix's answer, this script will export all the Oracle .cers in the current directory with the start of the thumbprint in the filename:

$type = [System.Security.Cryptography.X509Certificates.X509ContentType]::Cert
dir cert:\LocalMachine\TrustedPublisher | where { $_.Subject -like "*Oracle*" } | ForEach { [System.IO.File]::WriteAllBytes("vbox_Oracle_" + $_.Thumbprint.Substring(0, 10) + ".cer", $_.Export($type))  }

Then these can be imported with this cmd snippet:

for %%i in (%~dp0\vbox_*.cer) do certutil -addstore -f "TrustedPublisher" %%i
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.