Skip to content

Instantly share code, notes, and snippets.

@jetfir3
Last active December 4, 2025 02:47
Show Gist options
  • Select an option

  • Save jetfir3/25a4693549473792b90cfbdf20f9b567 to your computer and use it in GitHub Desktop.

Select an option

Save jetfir3/25a4693549473792b90cfbdf20f9b567 to your computer and use it in GitHub Desktop.
Download VMware Workstation for Windows without a Broadcom Account
<#
.SYNOPSIS
Download VMware Workstation Pro for Windows from Archive.org
.DESCRIPTION
This script downloads VMware Workstation installers directly from the archive.org VMware Workstation archive.
It allows for interactive menu selection or direct version specification.
.PARAMETER Version
Specifies the version of VMware Workstation to download (e.g., "17.6.3").
.PARAMETER Help
Displays the help information for the script and exits.
.EXAMPLE
.\download_workstation.ps1
Launches the interactive menu to select a version.
.EXAMPLE
.\download_workstation.ps1 -Version 17.6.4
Downloads VMware Workstation version 17.6.4 automatically.
#>
param(
[string]$Version,
[switch]$Help
)
$ErrorActionPreference = 'Stop'
if ($Help) {
Get-Help -Name $PSCommandPath -Full
exit 0
}
$ArchiveBaseUrl = "https://archive.org/download/vmwareworkstationarchive"
$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 {
Write-Host "Fetching major versions list..." -ForegroundColor DarkGray
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) {
$verStr = $link.Groups[1].Value.TrimEnd('/')
$majorVersions.Add($verStr)
}
}
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) {
Write-Host "Fetching installers for $majorVersion..." -ForegroundColor DarkGray
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$') {
$ver = $matches[1]
$fullVersions.Add([PSCustomObject]@{
Version = $ver
Filename = $filename
})
}
}
}
if ($fullVersions.Count -eq 0) {
Write-Error "No full versions found for base version ${majorVersion}: $_"
exit 1
}
return $fullVersions | Sort-Object -Property @{Expression={[version]$_.Version}; Descending=$true}
}
catch {
Write-Error "Failed to fetch or parse archive.org page for ${majorVersion}: $_"
exit 1
}
}
function Download-File($majorVersion, $filename) {
$downloadUrl = "$ArchiveBaseUrl/$majorVersion/$filename"
$outPath = Join-Path -Path $OutDir -ChildPath $filename
Write-Host "`nReady to download."
Write-Host "Source: $downloadUrl" -ForegroundColor Gray
Write-Host "Dest: $outPath" -ForegroundColor Gray
$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)..." -ForegroundColor Yellow
} else {
Write-Host "Downloading..." -ForegroundColor Cyan
}
$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
}
$selectedMajorVersion = $null
$selectedFilename = $null
$finalVersion = $null
if ($PSBoundParameters.ContainsKey('Version')) {
$finalVersion = $Version
if ($finalVersion -match "^(\d+)\.") {
$majorNum = $matches[1]
$guessedMajor = "$majorNum.x"
Write-Host "Looking for version $finalVersion in folder $guessedMajor..."
try {
$versionsInFolder = Get-ArchiveOrgFullVersions $guessedMajor
$match = $versionsInFolder | Where-Object { $_.Version -eq $finalVersion } | Select-Object -First 1
if ($match) {
$selectedMajorVersion = $guessedMajor
$selectedFilename = $match.Filename
Write-Host "Found." -ForegroundColor Green
} else {
Write-Error "Version $finalVersion not found in the $guessedMajor folder on archive.org."
exit 1
}
}
catch {
Write-Error "Could not access folder $guessedMajor. The version might not exist or the site is unreachable."
exit 1
}
}
else {
Write-Error "Invalid version format provided. Expected format like '17.6.3'."
exit 1
}
}
else {
$majorVersions = Get-ArchiveOrgMajorVersions
Write-Host "`nAvailable Base Versions:" -ForegroundColor Cyan
for ($i = 0; $i -lt $majorVersions.Count; $i++) {
Write-Host "$($i + 1). $($majorVersions[$i])"
}
do {
$choice = Read-Host "Enter choice (default 1)"
if ([string]::IsNullOrWhiteSpace($choice)) { $choice = "1" }
} until ($choice -match '^\d+$' -and [int]$choice -ge 1 -and [int]$choice -le $majorVersions.Count)
$selectedMajorVersion = $majorVersions[[int]$choice - 1]
$fullVersions = Get-ArchiveOrgFullVersions $selectedMajorVersion
Write-Host "`nAvailable Versions for $($selectedMajorVersion):" -ForegroundColor Cyan
for ($i = 0; $i -lt $fullVersions.Count; $i++) {
Write-Host "$($i + 1). $($fullVersions[$i].Version)"
}
do {
$choice = Read-Host "Enter choice (default 1)"
if ([string]::IsNullOrWhiteSpace($choice)) { $choice = "1" }
} until ($choice -match '^\d+$' -and [int]$choice -ge 1 -and [int]$choice -le $fullVersions.Count)
$selectedObj = $fullVersions[[int]$choice - 1]
$finalVersion = $selectedObj.Version
$selectedFilename = $selectedObj.Filename
}
$FinalExePath = Download-File $selectedMajorVersion $selectedFilename
Write-Host "`nFinished." -ForegroundColor Cyan
Write-Host "Installer location: $FinalExePath" -ForegroundColor Cyan
@jetfir3
Copy link
Author

jetfir3 commented Nov 18, 2025

the scripts dont work.

Using the script with archive.org mode works just fine. the cached cloudflare results have been removed for weeks now.
but, yes, manually visiting archive.org links also works.

@eMUQI
Copy link

eMUQI commented Nov 29, 2025

Thanks @jetfir3 ! It works for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment