Sha256: 13079b350c4226792e3b50bf6898e6b9b467b84b647399f7c39ad42932725c5d

Contents?: true

Size: 1020 Bytes

Versions: 58

Compression:

Stored size: 1020 Bytes

Contents

Param(
    [Parameter(Mandatory=$True)]
    [string]$path
)

# Stop on first error
$ErrorActionPreference = "Stop"

# Make the path complete
$path = Resolve-Path $path

# Determine if this is a 64-bit or 32-bit CPU
$architecture="x86"
if ((Get-WmiObject -Class Win32_OperatingSystem).OSArchitecture -eq "64-bit") {
    $architecture = "amd64"
}

# Extract the contents of the installer
Start-Process -FilePath $path `
    -ArgumentList ('--extract','--silent','--path','.') `
    -Wait `
    -NoNewWindow

# Find the installer
$matches = Get-ChildItem | Where-Object { $_.Name -match "VirtualBox-.*_$($architecture).msi" }
if ($matches.Count -ne 1) {
    Write-Host "Multiple matches for VirtualBox MSI found: $($matches.Count)"
    exit 1
}
$installerPath = Resolve-Path $matches[0]

# Run the installer
Start-Process -FilePath "$($env:systemroot)\System32\msiexec.exe" `
    -ArgumentList "/i `"$installerPath`" /qn /norestart /l*v `"$($pwd)\install.log`"" `
    -Verb RunAs `
    -Wait `
    -WorkingDirectory "$pwd"

Version data entries

58 entries across 54 versions & 6 rubygems

Version Path
vagrant-unbundled-2.3.6.0 plugins/hosts/windows/scripts/install_virtualbox.ps1
tamtam-vagrant-reload-1.2.1 vendor/cache/vagrant-2092df529ae7/plugins/hosts/windows/scripts/install_virtualbox.ps1
vagrant-unbundled-2.3.3.0 plugins/hosts/windows/scripts/install_virtualbox.ps1
vagrant-unbundled-2.3.2.0 plugins/hosts/windows/scripts/install_virtualbox.ps1
vagrant-unbundled-2.2.19.0 plugins/hosts/windows/scripts/install_virtualbox.ps1
vagrant-unbundled-2.2.18.0 plugins/hosts/windows/scripts/install_virtualbox.ps1
vagrant-unbundled-2.2.16.0 plugins/hosts/windows/scripts/install_virtualbox.ps1
vagrant-unbundled-2.2.14.0 plugins/hosts/windows/scripts/install_virtualbox.ps1
vagrant-aws-mkubenka-0.7.2.pre.24 vendor/bundle/ruby/2.7.0/bundler/gems/vagrant-22795b161bf6/plugins/hosts/windows/scripts/install_virtualbox.ps1
vagrant-unbundled-2.2.10.0 plugins/hosts/windows/scripts/install_virtualbox.ps1
vagrant-unbundled-2.2.9.0 plugins/hosts/windows/scripts/install_virtualbox.ps1
vagrant-unbundled-2.2.8.0 plugins/hosts/windows/scripts/install_virtualbox.ps1
vagrant-unbundled-2.2.7.0 plugins/hosts/windows/scripts/install_virtualbox.ps1
vagrant-unbundled-2.2.6.2 plugins/hosts/windows/scripts/install_virtualbox.ps1
vagrant-unbundled-2.2.6.1 plugins/hosts/windows/scripts/install_virtualbox.ps1
vagrant-unbundled-2.2.6.0 plugins/hosts/windows/scripts/install_virtualbox.ps1
vagrant-unbundled-2.2.5.0 plugins/hosts/windows/scripts/install_virtualbox.ps1
vagrant-unbundled-2.2.4.0 plugins/hosts/windows/scripts/install_virtualbox.ps1
vagrant-unbundled-2.2.3.0 plugins/hosts/windows/scripts/install_virtualbox.ps1
vagrant-unbundled-2.2.2.0 plugins/hosts/windows/scripts/install_virtualbox.ps1