Skip to content

Commit

Permalink
VirtualBox Guest Additions: Support for the new certificate name (fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
obilodeau committed Jan 9, 2017
1 parent b258b54 commit e6ea499
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Bug fixes::
* Packer binary is called `packer-io` on certain platforms ({uri-issue}3[#3])
* Windows 10 x86 Automatic Installation issues ({uri-issue}4[#4])
* Temporarily removed depwalker and regshot from choco packages ({uri-issue}16[#16])
* VirtualBox Guest Additions: Support for the new certificate name ({uri-issue}24[#24])

////
Expand Down
9 changes: 8 additions & 1 deletion malboxes/scripts/windows/vmtools.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,12 @@ $vboxAdditionsDrive = Get-WmiObject Win32_LogicalDisk -Filter "DriveType=5" |
Where-Object { $_.VolumeName -Like '*VBOX*' } |
Select -ExpandProperty DeviceID

&certutil -addstore -f "TrustedPublisher" "$vboxAdditionsDrive\cert\oracle-vbox.cer"
# Starting with VirtualBox 5.1.12 the name of the certificate changed
$newCertName = "vbox-sha1.cer"
if (Test-Path "$vboxAdditionsDrive\cert\$newCertName") {
&certutil -addstore -f "TrustedPublisher" "$vboxAdditionsDrive\cert\$newCertName"
}
else {
&certutil -addstore -f "TrustedPublisher" "$vboxAdditionsDrive\cert\oracle-vbox.cer"
}
&"$vboxAdditionsDrive\VBoxWindowsAdditions.exe" /S

1 comment on commit e6ea499

@Svieg
Copy link
Collaborator

@Svieg Svieg commented on e6ea499 Jan 9, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

Please sign in to comment.