Last active
August 9, 2025 17:58
-
-
Save jetfir3/25a4693549473792b90cfbdf20f9b567 to your computer and use it in GitHub Desktop.
Download VMware Workstation for Windows without a Broadcom Account
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.SYNOPSIS | |
Download VMware Workstation Pro for Windows without a Broadcom Account | |
.DESCRIPTION | |
This script allows downloading VMware Workstation installers from either Broadcom's Cloudflare CDN (v12.0.0 - 17.6.3) or from the archive.org VMware Workstation archive (v2.x+). | |
.PARAMETER KeepCompressed | |
If specified, prevents extraction of the .exe from the .tar file when using the Cloudflare CDN source (ignored for archive.org downloads) | |
.PARAMETER Version | |
Specifies the version of VMware Workstation to download (e.g., "17.6.3"). By default, Cloudflare will be first source checked then fallback to archive.org. | |
.PARAMETER Source | |
Specifies the download source: 'archive.org' or 'Cloudflare' (case-insensitive). | |
.PARAMETER Help | |
Displays the help information for the script and exits. | |
.EXAMPLE | |
.\download_workstation.ps1 -Version 17.6.3 | |
Downloads VMware Workstation version 17.6.3 from Cloudflare CDN (if available) or archive.org, without prompts. | |
.EXAMPLE | |
.\download_workstation.ps1 -Version 17.6.4 -Source archive.org | |
Downloads VMware Workstation version 17.6.4 from archive.org, bypassing source selection. | |
.EXAMPLE | |
.\download_workstation.ps1 -Version 17.6.3 -Source Cloudflare -KeepCompressed | |
Downloads VMware Workstation version 17.6.3 from Cloudflare CDN with the .tar file, without extracting it. | |
.EXAMPLE | |
.\download_workstation.ps1 -Help | |
Displays this help information and exits. | |
#> | |
param( | |
[switch]$KeepCompressed, | |
[string]$Version, | |
[string]$Source, | |
[switch]$Help | |
) | |
$ErrorActionPreference = 'Stop' | |
if ($Help) { | |
Get-Help -Name $PSCommandPath -Full | |
exit 0 | |
} | |
$BaseUrl = "https://softwareupdate-prod.broadcom.com/cds/vmw-desktop/" | |
$CdnHost = "softwareupdate-prod.broadcom.com" | |
$CdnAlias = "softwareupdate-prod.broadcom.com.cdn.cloudflare.net" | |
$ArchiveBaseUrl = "https://archive.org/download/vmwareworkstationarchive" | |
# Cloudflare CDN metadata | |
[xml]$XmlData = @" | |
<metalist> | |
<metadata><version>12.0.0</version><url>ws/12.0.0/2985596/windows/core/</url></metadata> | |
<metadata><version>12.0.0</version><url>ws/12.0.1/3160714/windows/core/</url></metadata> | |
<metadata><version>12.0.0</version><url>ws/12.1.0/3272444/windows/core/</url></metadata> | |
<metadata><version>12.0.0</version><url>ws/12.1.1/3770994/windows/core/</url></metadata> | |
<metadata><version>12.0.0</version><url>ws/12.5.0/4352439/windows/core/</url></metadata> | |
<metadata><version>12.0.0</version><url>ws/12.5.1/4542065/windows/core/</url></metadata> | |
<metadata><version>12.0.0</version><url>ws/12.5.2/4638234/windows/core/</url></metadata> | |
<metadata><version>12.0.0</version><url>ws/12.5.3/5115892/windows/core/</url></metadata> | |
<metadata><version>12.0.0</version><url>ws/12.5.4/5192485/windows/core/</url></metadata> | |
<metadata><version>12.0.0</version><url>ws/12.5.5/5234757/windows/core/</url></metadata> | |
<metadata><version>12.0.0</version><url>ws/12.5.6/5528349/windows/core/</url></metadata> | |
<metadata><version>12.0.0</version><url>ws/12.5.7/5813279/windows/core/</url></metadata> | |
<metadata><version>12.0.0</version><url>ws/12.5.8/7098237/windows/core/</url></metadata> | |
<metadata><version>12.0.0</version><url>ws/12.5.9/7535481/windows/core/</url></metadata> | |
<metadata><version>14.0.0</version><url>ws/14.0.0/6661328/windows/core/</url></metadata> | |
<metadata><version>14.0.0</version><url>ws/14.1.0/7370693/windows/core/</url></metadata> | |
<metadata><version>14.0.0</version><url>ws/14.1.1/7528167/windows/core/</url></metadata> | |
<metadata><version>14.0.0</version><url>ws/14.1.2/8497320/windows/core/</url></metadata> | |
<metadata><version>14.0.0</version><url>ws/14.1.3/9474260/windows/core/</url></metadata> | |
<metadata><version>14.0.0</version><url>ws/14.1.4/10722678/windows/core/</url></metadata> | |
<metadata><version>14.0.0</version><url>ws/14.1.5/10950780/windows/core/</url></metadata> | |
<metadata><version>14.0.0</version><url>ws/14.1.6/12368378/windows/core/</url></metadata> | |
<metadata><version>14.0.0</version><url>ws/14.1.7/12989993/windows/core/</url></metadata> | |
<metadata><version>15.0.0</version><url>ws/15.0.0/10134415/windows/core/</url></metadata> | |
<metadata><version>15.0.0</version><url>ws/15.0.1/10737736/windows/core/</url></metadata> | |
<metadata><version>15.0.0</version><url>ws/15.0.2/10952284/windows/core/</url></metadata> | |
<metadata><version>15.0.0</version><url>ws/15.0.3/12422535/windows/core/</url></metadata> | |
<metadata><version>15.0.0</version><url>ws/15.0.4/12990004/windows/core/</url></metadata> | |
<metadata><version>15.0.0</version><url>ws/15.1.0/13591040/windows/core/</url></metadata> | |
<metadata><version>15.0.0</version><url>ws/15.5.0/14665864/windows/core/</url></metadata> | |
<metadata><version>15.0.0</version><url>ws/15.5.1/15018445/windows/core/</url></metadata> | |
<metadata><version>15.0.0</version><url>ws/15.5.2/15785246/windows/core/</url></metadata> | |
<metadata><version>15.0.0</version><url>ws/15.5.5/16285975/windows/core/</url></metadata> | |
<metadata><version>15.0.0</version><url>ws/15.5.6/16341506/windows/core/</url></metadata> | |
<metadata><version>15.0.0</version><url>ws/15.5.7/17171714/windows/core/</url></metadata> | |
<metadata><version>16.0.0</version><url>ws/16.0.0/16894299/windows/core/</url></metadata> | |
<metadata><version>16.0.0</version><url>ws/16.1.0/17198959/windows/core/</url></metadata> | |
<metadata><version>16.0.0</version><url>ws/16.1.1/17801498/windows/core/</url></metadata> | |
<metadata><version>16.0.0</version><url>ws/16.1.2/17966106/windows/core/</url></metadata> | |
<metadata><version>16.0.0</version><url>ws/16.2.0/18760230/windows/core/</url></metadata> | |
<metadata><version>16.0.0</version><url>ws/16.2.1/18811642/windows/core/</url></metadata> | |
<metadata><version>16.0.0</version><url>ws/16.2.3/19376536/windows/core/</url></metadata> | |
<metadata><version>16.0.0</version><url>ws/16.2.4/20089737/windows/core/</url></metadata> | |
<metadata><version>16.0.0</version><url>ws/16.2.5/20904516/windows/core/</url></metadata> | |
<metadata><version>17.0.0</version><url>ws/17.0.0/20800274/windows/core/</url></metadata> | |
<metadata><version>17.0.0</version><url>ws/17.0.1/21139696/windows/core/</url></metadata> | |
<metadata><version>17.0.0</version><url>ws/17.0.2/21581411/windows/core/</url></metadata> | |
<metadata><version>17.0.0</version><url>ws/17.5.0/22583795/windows/core/</url></metadata> | |
<metadata><version>17.0.0</version><url>ws/17.5.1/23298084/windows/core/</url></metadata> | |
<metadata><version>17.0.0</version><url>ws/17.5.2/23775571/windows/core/</url></metadata> | |
<metadata><version>17.0.0</version><url>ws/17.6.0/24238078/windows/core/</url></metadata> | |
<metadata><version>17.0.0</version><url>ws/17.6.1/24319023/windows/core/</url></metadata> | |
<metadata><version>17.0.0</version><url>ws/17.6.2/24409262/windows/core/</url></metadata> | |
<metadata><version>17.0.0</version><url>ws/17.6.3/24583834/windows/core/</url></metadata> | |
</metalist> | |
"@ | |
$OutDir = Join-Path -Path $env:USERPROFILE -ChildPath "Downloads" | |
if (-not (Test-Path -Path $OutDir)) { | |
New-Item -ItemType Directory -Path $OutDir -Force | Out-Null | |
} | |
function Get-ArchiveOrgMajorVersions { | |
try { | |
$response = Invoke-WebRequest -Uri $ArchiveBaseUrl -UseBasicParsing | |
$html = $response.Content | |
$majorVersions = [System.Collections.Generic.List[string]]::new() | |
if ($html -match '<table class="directory-listing-table">[\s\S]*?</table>') { | |
$tableContent = $matches[0] | |
$links = [regex]::Matches($tableContent, '<a href="(\d+\.x/)"') | |
foreach ($link in $links) { | |
$version = $link.Groups[1].Value.TrimEnd('/') | |
$majorVersions.Add($version) | |
} | |
} | |
if ($majorVersions.Count -eq 0) { | |
Write-Error "No versions found on archive.org." | |
exit 1 | |
} | |
return $majorVersions | Sort-Object { [System.Version]($_ -replace 'x$', '0') } -Descending | |
} | |
catch { | |
Write-Error "Failed to fetch or parse archive.org page: $_" | |
exit 1 | |
} | |
} | |
function Get-ArchiveOrgFullVersions($majorVersion) { | |
try { | |
$url = "$ArchiveBaseUrl/$majorVersion/" | |
$response = Invoke-WebRequest -Uri $url -UseBasicParsing | |
$html = $response.Content | |
$fullVersions = [System.Collections.Generic.List[PSObject]]::new() | |
if ($html -match '<table class="directory-listing-table">[\s\S]*?</table>') { | |
$tableContent = $matches[0] | |
$links = [regex]::Matches($tableContent, '<a href="([^"]+\.exe)">') | |
foreach ($link in $links) { | |
$filename = $link.Groups[1].Value | |
if ($filename -match '-(\d+\.\d+\.\d+)(?:-\d+)?\.exe$') { | |
$version = $matches[1] | |
$fullVersions.Add([PSCustomObject]@{ | |
Version = $version | |
Filename = $filename | |
}) | |
} | |
} | |
} | |
if ($fullVersions.Count -eq 0) { | |
Write-Error "No full versions found for base version ${majorVersion}: $_" | |
exit 1 | |
} | |
return $fullVersions | Sort-Object { [System.Version]$_.Version } -Descending | |
} | |
catch { | |
Write-Error "Failed to fetch or parse archive.org page for ${majorVersion}: $_" | |
exit 1 | |
} | |
} | |
function Download-ArchiveOrgFile($majorVersion, $filename, $version) { | |
$downloadUrl = "$ArchiveBaseUrl/$majorVersion/$filename" | |
$outPath = Join-Path -Path $OutDir -ChildPath $filename | |
Write-Host "Attempting to download from URL:" -ForegroundColor Cyan | |
Write-Host $downloadUrl -ForegroundColor Cyan | |
$maxRetries = 3 | |
$retryDelay = 5 | |
$attempt = 1 | |
while ($attempt -le $maxRetries) { | |
try { | |
$curlArgs = @( | |
"--progress-bar", | |
"--fail", | |
"--location", | |
"--output", $outPath, | |
"--continue-at", "-", | |
$downloadUrl | |
) | |
if ($attempt -gt 1 -or (Test-Path -Path $outPath)) { | |
Write-Host "Attempt $attempt of $maxRetries (resuming if partial file exists)..." -ForegroundColor Yellow | |
} else { | |
Write-Host "Attempt $attempt of $maxRetries..." -ForegroundColor Yellow | |
} | |
$process = Start-Process curl.exe -ArgumentList $curlArgs -Wait -NoNewWindow -PassThru | |
if ($process.ExitCode -eq 0) { | |
Write-Host "`nDownload successful." -ForegroundColor Green | |
return $outPath | |
} else { | |
Write-Warning "Attempt $attempt failed with curl exit code: $($process.ExitCode)" | |
if ($attempt -lt $maxRetries) { | |
Write-Host "Retrying in $retryDelay seconds..." | |
Start-Sleep -Seconds $retryDelay | |
} | |
} | |
} | |
catch { | |
Write-Warning "Attempt $attempt failed: $_" | |
if ($attempt -lt $maxRetries) { | |
Write-Host "Retrying in $retryDelay seconds..." | |
Start-Sleep -Seconds $retryDelay | |
} | |
} | |
$attempt++ | |
} | |
Write-Error "Download failed after $maxRetries attempts." | |
exit 1 | |
} | |
if ($PSBoundParameters.ContainsKey('Version')) { | |
$availableCdnVersions = @{} | |
foreach ($node in $XmlData.metalist.metadata) { | |
if ($node.url -match "ws/(\d+\.\d+\.\d+)/(\d+)/windows/core/") { | |
$fullVersion = $matches[1] | |
$buildNumber = $matches[2] | |
$availableCdnVersions[$fullVersion] = $buildNumber | |
} | |
} | |
$archiveVersions = @{} | |
$majorVersions = Get-ArchiveOrgMajorVersions | |
foreach ($major in $majorVersions) { | |
$fullVersions = Get-ArchiveOrgFullVersions $major | |
foreach ($ver in $fullVersions) { | |
$archiveVersions[$ver.Version] = [PSCustomObject]@{ | |
MajorVersion = $major | |
Filename = $ver.Filename | |
} | |
} | |
} | |
if ($PSBoundParameters.ContainsKey('Source')) { | |
$normalizedSource = $Source.ToLower() | |
if ($normalizedSource -notin @("archive.org", "cloudflare")) { | |
Write-Error "Invalid -Source value '$Source'. Must be 'archive.org' or 'Cloudflare' (case-insensitive)." | |
exit 1 | |
} | |
if ($normalizedSource -eq "cloudflare" -and $availableCdnVersions.ContainsKey($Version)) { | |
$source = "Cloudflare CDN" | |
$Build = $availableCdnVersions[$Version] | |
Write-Host "Version $Version found in Cloudflare CDN." -ForegroundColor Green | |
} | |
elseif ($normalizedSource -eq "archive.org" -and $archiveVersions.ContainsKey($Version)) { | |
$source = "archive.org" | |
$selectedMajorVersion = $archiveVersions[$Version].MajorVersion | |
$selectedFilename = $archiveVersions[$Version].Filename | |
Write-Host "Version $Version found in archive.org." -ForegroundColor Green | |
if ($KeepCompressed) { | |
Write-Warning "-KeepCompressed is ignored for archive.org downloads, as files are already uncompressed .exe files." | |
} | |
} | |
else { | |
Write-Error "Version '$Version' was not found in the specified source '$Source'." | |
exit 1 | |
} | |
} | |
else { | |
if ($availableCdnVersions.ContainsKey($Version)) { | |
$source = "Cloudflare CDN" | |
$Build = $availableCdnVersions[$Version] | |
Write-Host "Version $Version found in Cloudflare CDN." -ForegroundColor Green | |
} | |
elseif ($archiveVersions.ContainsKey($Version)) { | |
$source = "archive.org" | |
$selectedMajorVersion = $archiveVersions[$Version].MajorVersion | |
$selectedFilename = $archiveVersions[$Version].Filename | |
Write-Host "Version $Version found in archive.org." -ForegroundColor Green | |
if ($KeepCompressed) { | |
Write-Warning "-KeepCompressed is ignored for archive.org downloads, as files are already uncompressed .exe files." | |
} | |
} | |
else { | |
Write-Error "Version '$Version' was not found in Cloudflare CDN or archive.org." | |
exit 1 | |
} | |
} | |
} | |
else { | |
Write-Host "`nSelect Download Source:" -ForegroundColor Green | |
Write-Host "1. Archive.org" | |
Write-Host " - v2.0.1 - 17.6.4 and up" | |
Write-Host " - Potentially slower downloads" | |
Write-Host "2. Cloudflare CDN" | |
Write-Host " - v12.0.0 - 17.6.3 ONLY" | |
Write-Host " - Faster downloads from official CDN" | |
Write-Host " - Core installers only ; no bundled VMware Tools" | |
$choice = Read-Host "`nEnter the number of your choice (default is 1, Archive.org)" | |
if (-not $choice -or $choice -eq "1") { | |
$source = "archive.org" | |
if ($KeepCompressed) { | |
Write-Warning "-KeepCompressed is ignored for archive.org downloads, as files are already uncompressed .exe files." | |
} | |
} | |
elseif ($choice -eq "2") { | |
$source = "Cloudflare CDN" | |
} | |
else { | |
Write-Error "Invalid choice. Please enter 1 or 2." | |
exit 1 | |
} | |
} | |
if ($source -eq "Cloudflare CDN") { | |
$availableVersions = @{} | |
$baseVersions = [System.Collections.Generic.List[string]]::new() | |
foreach ($node in $XmlData.metalist.metadata) { | |
if (-not $baseVersions.Contains($node.version)) { | |
$baseVersions.Add($node.version) | |
} | |
if ($node.url -match "ws/(\d+\.\d+\.\d+)/(\d+)/windows/core/") { | |
$fullVersion = $matches[1] | |
$buildNumber = $matches[2] | |
if (-not $availableVersions.ContainsKey($fullVersion)) { | |
$availableVersions[$fullVersion] = $buildNumber | |
} | |
} | |
} | |
if (-not $PSBoundParameters.ContainsKey('Version')) { | |
$sortedBaseVersions = $baseVersions | ForEach-Object { [System.Version]$_ } | Sort-Object -Descending | ForEach-Object { $_.ToString() } | |
Write-Host "Available Base Versions (Cloudflare CDN):" | |
for ($i = 0; $i -lt $sortedBaseVersions.Count; $i++) { | |
Write-Host "$($i + 1). $($sortedBaseVersions[$i])" | |
} | |
$choice = Read-Host "Enter the number of your choice (default is 1)" | |
if (-not $choice -or $choice -eq "1") { | |
$selectedBaseVersion = $sortedBaseVersions[0] | |
} | |
elseif ($choice -match '^\d+$' -and [int]$choice -ge 1 -and [int]$choice -le $sortedBaseVersions.Count) { | |
$selectedBaseVersion = $sortedBaseVersions[[int]$choice - 1] | |
} | |
else { | |
Write-Error "Invalid choice. Please enter a number between 1 and $($sortedBaseVersions.Count)." | |
exit 1 | |
} | |
$majorVersion = ($selectedBaseVersion.Split('.'))[0] | |
$filteredFullVersions = $availableVersions.Keys | Where-Object { $_.StartsWith("$majorVersion.") } | ForEach-Object { [System.Version]$_ } | Sort-Object -Descending | ForEach-Object { $_.ToString() } | |
if ($filteredFullVersions.Count -eq 0) { | |
Write-Error "No full versions found for the selected base version '$selectedBaseVersion'." | |
exit 1 | |
} | |
Write-Host "Full Versions for $selectedBaseVersion (Cloudflare CDN):" | |
for ($i = 0; $i -lt $filteredFullVersions.Count; $i++) { | |
Write-Host "$($i + 1). $($filteredFullVersions[$i])" | |
} | |
$choice = Read-Host "Enter the number of your choice (default is 1)" | |
if (-not $choice -or $choice -eq "1") { | |
$Version = $filteredFullVersions[0] | |
} | |
elseif ($choice -match '^\d+$' -and [int]$choice -ge 1 -and [int]$choice -le $filteredFullVersions.Count) { | |
$Version = $filteredFullVersions[[int]$choice - 1] | |
} | |
else { | |
Write-Error "Invalid choice. Please enter a number between 1 and $($filteredFullVersions.Count)." | |
exit 1 | |
} | |
$Build = $availableVersions[$Version] | |
} | |
Write-Host "Selected VMware Workstation $Version (Build $Build) from Cloudflare CDN" -ForegroundColor Green | |
$TarFileName = "VMware-workstation-${Version}-${Build}.exe.tar" | |
$ExeFileName = "VMware-workstation-${Version}-${Build}.exe" | |
$DownloadUrl = "${BaseUrl}ws/$Version/$Build/windows/core/$TarFileName" | |
$TarOutPath = Join-Path -Path $OutDir -ChildPath $TarFileName | |
$ExtractDir = Join-Path -Path $OutDir -ChildPath "VMware-Workstation-$Version-$Build" | |
$FinalExePath = Join-Path -Path $ExtractDir -ChildPath $ExeFileName | |
try { | |
$cdnIPs = (Resolve-DnsName -Name $CdnAlias -Type A).IPAddress | |
if ($cdnIPs.Count -eq 0) { | |
throw "No IPs found for CDN." | |
} | |
} | |
catch { | |
Write-Error "Failed to resolve Cloudflare CDN hostname: $CdnAlias" | |
exit 1 | |
} | |
Write-Host "Attempting to download from URL:" -ForegroundColor Cyan | |
Write-Host $DownloadUrl -ForegroundColor Cyan | |
$downloadSuccess = $false | |
$maxRetries = 3 | |
$retryDelay = 5 | |
foreach ($ip in $cdnIPs) { | |
$ResolveArg = "${CdnHost}:443:${ip}" | |
$attempt = 1 | |
while ($attempt -le $maxRetries) { | |
try { | |
$CurlArgs = @( | |
"--progress-bar", | |
"--fail", | |
"--location", | |
"--output", $TarOutPath, | |
"--continue-at", "-", | |
"--resolve", $ResolveArg, | |
$DownloadUrl | |
) | |
if ($attempt -gt 1 -or (Test-Path -Path $TarOutPath)) { | |
Write-Host "Attempt $attempt of $maxRetries for IP $ip (resuming if partial file exists)..." -ForegroundColor Yellow | |
} else { | |
Write-Host "Attempt $attempt of $maxRetries for IP $ip..." -ForegroundColor Yellow | |
} | |
$process = Start-Process curl.exe -ArgumentList $CurlArgs -Wait -NoNewWindow -PassThru | |
if ($process.ExitCode -eq 0) { | |
$downloadSuccess = $true | |
Write-Host "`nDownload successful." -ForegroundColor Green | |
break | |
} else { | |
Write-Warning "Attempt $attempt for IP $ip failed with curl exit code: $($process.ExitCode)" | |
if ($attempt -lt $maxRetries) { | |
Write-Host "Retrying in $retryDelay seconds..." | |
Start-Sleep -Seconds $retryDelay | |
} | |
} | |
} | |
catch { | |
Write-Warning "Attempt $attempt for IP $ip failed: $_" | |
if ($attempt -lt $maxRetries) { | |
Write-Host "Retrying in $retryDelay seconds..." | |
Start-Sleep -Seconds $retryDelay | |
} | |
} | |
$attempt++ | |
} | |
if ($downloadSuccess) { | |
break | |
} | |
} | |
if (-not $downloadSuccess) { | |
Write-Error "Download failed after trying all available CDN IPs." | |
exit 1 | |
} | |
if ($KeepCompressed) { | |
Write-Host "File saved to: $TarOutPath" -ForegroundColor Cyan | |
exit 0 | |
} | |
Write-Host "Extracting installer..." -ForegroundColor Cyan | |
try { | |
if (Test-Path -Path $ExtractDir) { | |
Remove-Item -Path $ExtractDir -Recurse -Force | |
} | |
New-Item -ItemType Directory -Path $ExtractDir -Force | Out-Null | |
tar.exe -xf $TarOutPath -C $ExtractDir | |
Write-Host "Extraction successful." -ForegroundColor Green | |
} | |
catch { | |
Write-Error "Extraction failed. Please ensure 'tar.exe' is available in your system's PATH. Error: $_" | |
exit 1 | |
} | |
finally { | |
if (Test-Path -Path $TarOutPath) { | |
Remove-Item -Path $TarOutPath -Force | |
} | |
} | |
if (Test-Path -Path $FinalExePath) { | |
Write-Host "`nFinished." -ForegroundColor Cyan | |
Write-Host "Installer location: $FinalExePath" -ForegroundColor Cyan | |
} else { | |
Write-Error "Extraction seems to have completed, but the installer EXE was not found at the expected path." | |
exit 1 | |
} | |
} | |
else { | |
if (-not $PSBoundParameters.ContainsKey('Version')) { | |
$majorVersions = Get-ArchiveOrgMajorVersions | |
Write-Host "Available Base Versions (archive.org):" | |
for ($i = 0; $i -lt $majorVersions.Count; $i++) { | |
Write-Host "$($i + 1). $($majorVersions[$i])" | |
} | |
$choice = Read-Host "Enter the number of your choice (default is 1)" | |
if (-not $choice -or $choice -eq "1") { | |
$selectedMajorVersion = $majorVersions[0] | |
} | |
elseif ($choice -match '^\d+$' -and [int]$choice -ge 1 -and [int]$choice -le $majorVersions.Count) { | |
$selectedMajorVersion = $majorVersions[[int]$choice - 1] | |
} | |
else { | |
Write-Error "Invalid choice. Please enter a number between 1 and $($majorVersions.Count)." | |
exit 1 | |
} | |
$fullVersions = Get-ArchiveOrgFullVersions $selectedMajorVersion | |
$versionList = $fullVersions | ForEach-Object { $_.Version } | Sort-Object { [System.Version]$_.Version } -Descending | |
if ($versionList.Count -eq 0) { | |
Write-Error "No full versions found for base version $selectedMajorVersion." | |
exit 1 | |
} | |
Write-Host "Full Versions for $selectedMajorVersion (archive.org):" | |
for ($i = 0; $i -lt $versionList.Count; $i++) { | |
Write-Host "$($i + 1). $($versionList[$i])" | |
} | |
$choice = Read-Host "Enter the number of your choice (default is 1)" | |
if (-not $choice -or $choice -eq "1") { | |
$Version = $versionList[0] | |
} | |
elseif ($choice -match '^\d+$' -and [int]$choice -ge 1 -and [int]$choice -le $versionList.Count) { | |
$Version = $versionList[[int]$choice - 1] | |
} | |
else { | |
Write-Error "Invalid choice. Please enter a number between 1 and $($versionList.Count)." | |
exit 1 | |
} | |
$selectedFilename = ($fullVersions | Where-Object { $_.Version -eq $Version }).Filename | |
} | |
Write-Host "Selected VMware Workstation $Version from archive.org" -ForegroundColor Green | |
$FinalExePath = Download-ArchiveOrgFile $selectedMajorVersion $selectedFilename $Version | |
Write-Host "`nFinished." -ForegroundColor Cyan | |
Write-Host "Installer location: $FinalExePath" -ForegroundColor Cyan | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-KeepCompressed
to keep download file compressed, exiting after download (ignored for v17.6.4 and higher)-Source
to choose from Cloudflare (versions 12.0.0 to 17.6.3) or archive.org (v12.0.0 to 17.6.4 and higher) as download source-Version <Version>
to specify the desired version (12.0.0 or higher required)Run directly with:
or
Example with options:
VMware Tools:
https://packages-prod.broadcom.com/tools/
Latest - https://packages-prod.broadcom.com/tools/releases/latest/
Legacy / macOS - https://packages-prod.broadcom.com/tools/frozen/
Linux / Windows - https://packages-prod.broadcom.com/tools/releases/
VMware Download scripts for other platforms: