Compare commits

...

5 Commits
v1.22 ... v1.25

Author SHA1 Message Date
Biswapriyo Nath
b1eebac8dc Add Windows 10 Redstone 5 17763.379 builds
* Closes #25
2021-09-25 21:11:17 +01:00
Pete Batard
8508ac6164 Add UEFI Shell 2.0 ISO downloads
* Also retrieve archs from the GitHub releases
* Also add Shell 2.2 21H2 download
2021-08-30 21:41:07 +01:00
Pete Batard
eac06c958f Update README.md 2021-08-24 16:49:42 +02:00
Pete Batard
2ee5f896d3 Add UEFI Shell bootable ISO downloads 2021-08-24 16:43:44 +02:00
Pete Batard
28725b287c Update README.md 2021-08-19 23:00:56 +02:00
2 changed files with 105 additions and 39 deletions

121
Fido.ps1
View File

@@ -1,5 +1,5 @@
# #
# Fido v1.22 - Retail Windows ISO Downloader # Fido v1.25 - Feature ISO Downloader, for retail Windows images and UEFI Shell
# Copyright © 2019-2021 Pete Batard <pete@akeo.ie> # Copyright © 2019-2021 Pete Batard <pete@akeo.ie>
# Command line support: Copyright © 2021 flx5 # Command line support: Copyright © 2021 flx5
# ConvertTo-ImageSource: Copyright © 2016 Chris Carter # ConvertTo-ImageSource: Copyright © 2016 Chris Carter
@@ -139,6 +139,12 @@ $WindowsVersions = @(
@("Windows 10 Education", 1216), @("Windows 10 Education", 1216),
@("Windows 10 Home China ", ($zh + 1215)) @("Windows 10 Home China ", ($zh + 1215))
), ),
@(
"1809 R3 (Build 17763.379 - 2019.03)",
@("Windows 10 Home/Pro", 1203),
@("Windows 10 Education", 1202),
@("Windows 10 Home China ", ($zh + 1204))
),
@( @(
"1809 R2 (Build 17763.107 - 2018.10)", "1809 R2 (Build 17763.107 - 2018.10)",
@("Windows 10 Home/Pro", 1060), @("Windows 10 Home/Pro", 1060),
@@ -246,6 +252,31 @@ $WindowsVersions = @(
@("Windows 7 Professional", 1), @("Windows 7 Professional", 1),
@("Windows 7 Home Premium", 2) @("Windows 7 Home Premium", 2)
) )
),
@(
@("UEFI Shell 2.2", "UEFI_SHELL 2.2"),
@(
"21H2 (edk2-stable202108)",
@("Release", 0),
@("Debug", 1)
),
@(
"21H1 (edk2-stable202105)",
@("Release", 0),
@("Debug", 1)
),
@(
"20H2 (edk2-stable202011)",
@("Release", 0),
@("Debug", 1)
)
),
@(
@("UEFI Shell 2.0", "UEFI_SHELL 2.0"),
@(
"4.632 [20100426]",
@("Release", 0)
)
) )
) )
@@ -635,6 +666,8 @@ function Get-Windows-Languages([int]$SelectedVersion, [int]$SelectedEdition)
} }
$i++ $i++
} }
} elseif ($WindowsVersions[$SelectedVersion][0][1].StartsWith("UEFI_SHELL")) {
$languages += @(New-Object PsObject -Property @{ DisplayLanguage = "English (US)"; Language = "en-us"; Id = 0 })
} else { } else {
$url = "https://www.microsoft.com/" + $QueryLocale + "/api/controls/contentinclude/html" $url = "https://www.microsoft.com/" + $QueryLocale + "/api/controls/contentinclude/html"
$url += "?pageId=" + $RequestData["GetLangs"][0] $url += "?pageId=" + $RequestData["GetLangs"][0]
@@ -682,13 +715,42 @@ function Get-Windows-Languages([int]$SelectedVersion, [int]$SelectedEdition)
} }
# Return an array of download links for each supported arch # Return an array of download links for each supported arch
function Get-Windows-Download-Links([int]$SelectedVersion, [int]$SelectedEdition, [string]$SkuId, [string]$LanguageName) function Get-Windows-Download-Links([int]$SelectedVersion, [int]$SelectedRelease, [int]$SelectedEdition, [string]$SkuId, [string]$LanguageName)
{ {
$links = @() $links = @()
if ($WindowsVersions[$SelectedVersion][0][1] -eq "WIN7") { if ($WindowsVersions[$SelectedVersion][0][1] -eq "WIN7") {
foreach ($Version in $Windows7Versions[$SelectedEdition][$SkuId][2]) { foreach ($Version in $Windows7Versions[$SelectedEdition][$SkuId][2]) {
$links += @(New-Object PsObject -Property @{ Type = $Version[0]; Link = $Version[1] }) $links += @(New-Object PsObject -Property @{ Type = $Version[0]; Link = $Version[1] })
} }
} elseif ($WindowsVersions[$SelectedVersion][0][1].StartsWith("UEFI_SHELL")) {
$tag = $WindowsVersions[$SelectedVersion][$SelectedRelease][0].Split(' ')[0]
$shell_version = $WindowsVersions[$SelectedVersion][0][1].Split(' ')[1]
$url = "https://github.com/pbatard/UEFI-Shell/releases/download/" + $tag
$link = $url + "/UEFI-Shell-" + $shell_version + "-" + $tag
if ($SelectedEdition -eq 0) {
$link += "-RELEASE.iso"
} else {
$link += "-DEBUG.iso"
}
try {
# Read the supported archs from the release URL
$url += "/Version.xml"
$xml = New-Object System.Xml.XmlDocument
if ($Verbosity -ge 2) {
Write-Host Querying $url
}
$xml.Load($url)
$sep = ""
$archs = ""
foreach($arch in $xml.release.supported_archs.arch) {
$archs += $sep + $arch
$sep = ", "
}
$links += @(New-Object PsObject -Property @{ Type = $archs; Link = $link })
} catch {
Error($_.Exception.Message)
return @()
}
} else { } else {
$url = "https://www.microsoft.com/" + $QueryLocale + "/api/controls/contentinclude/html" $url = "https://www.microsoft.com/" + $QueryLocale + "/api/controls/contentinclude/html"
$url += "?pageId=" + $RequestData["GetLinks"][0] $url += "?pageId=" + $RequestData["GetLinks"][0]
@@ -753,7 +815,10 @@ function Process-Download-Link([string]$Url)
if ($Cmd) { if ($Cmd) {
$pattern = '.*\/(.*\.iso).*' $pattern = '.*\/(.*\.iso).*'
$File = [regex]::Match($Url, $pattern).Groups[1].Value $File = [regex]::Match($Url, $pattern).Groups[1].Value
$Size = Size-To-Human-Readable (Invoke-WebRequest -UseBasicParsing -Uri $Url -Method Head).Headers.'Content-Length' # PowerShell implicit conversions are iffy, so we need to force them...
$str_size = (Invoke-WebRequest -UseBasicParsing -Uri $Url -Method Head).Headers.'Content-Length'
$tmp_size = [uint64]::Parse($str_size)
$Size = Size-To-Human-Readable $tmp_size
Write-Host "Downloading '$File' ($Size)..." Write-Host "Downloading '$File' ($Size)..."
Invoke-WebRequest -UseBasicParsing -Uri $Url -OutFile $File Invoke-WebRequest -UseBasicParsing -Uri $Url -OutFile $File
} else { } else {
@@ -881,7 +946,7 @@ if ($Cmd) {
} }
# Language selection => Request and populate Arch download links # Language selection => Request and populate Arch download links
$links = Get-Windows-Download-Links $winVersionId $winEditionId $winLanguageId $winLanguageName $links = Get-Windows-Download-Links $winVersionId $winReleaseId $winEditionId $winLanguageId $winLanguageName
if (!$links) { if (!$links) {
exit 3 exit 3
} }
@@ -896,7 +961,7 @@ if ($Cmd) {
if (!$Arch -and $Verbosity -ge 1) { if (!$Arch -and $Verbosity -ge 1) {
Write-Host "No architecture specified (-Arch). Defaulting to '$($link.Type)'." Write-Host "No architecture specified (-Arch). Defaulting to '$($link.Type)'."
} }
$Selected += ", " + $link.Type $Selected += ", [" + $link.Type + "]"
$winLink = $link $winLink = $link
break; break;
} }
@@ -912,7 +977,7 @@ if ($Cmd) {
# Arch selection => Return selected download link # Arch selection => Return selected download link
if ($GetUrl) { if ($GetUrl) {
Write-Host $winLink.Link Return $winLink.Link
$ExitCode = 0 $ExitCode = 0
} else { } else {
Write-Host "Selected: $Selected" Write-Host "Selected: $Selected"
@@ -963,7 +1028,9 @@ $Continue.add_click({
1 { # Windows Version selection 1 { # Windows Version selection
$XMLForm.Title = Get-Translation($English[12]) $XMLForm.Title = Get-Translation($English[12])
Refresh-Control($XMLForm) Refresh-Control($XMLForm)
if ($WindowsVersion.SelectedValue.Version.StartsWith("Windows") -and $WindowsVersion.SelectedValue.Version -ne "Windows 7") {
Check-Locale Check-Locale
}
$releases = Get-Windows-Releases $WindowsVersion.SelectedValue.Index $releases = Get-Windows-Releases $WindowsVersion.SelectedValue.Index
$script:WindowsRelease = Add-Entry $Stage "Release" $releases $script:WindowsRelease = Add-Entry $Stage "Release" $releases
$Back.Content = Get-Translation($English[8]) $Back.Content = Get-Translation($English[8])
@@ -990,7 +1057,7 @@ $Continue.add_click({
4 { # Language selection => Request and populate Arch download links 4 { # Language selection => Request and populate Arch download links
$XMLForm.Title = Get-Translation($English[12]) $XMLForm.Title = Get-Translation($English[12])
Refresh-Control($XMLForm) Refresh-Control($XMLForm)
$links = Get-Windows-Download-Links $WindowsVersion.SelectedValue.Index $ProductEdition.SelectedValue.Id $Language.SelectedValue.Id $Language.SelectedValue.Language $links = Get-Windows-Download-Links $WindowsVersion.SelectedValue.Index $WindowsRelease.SelectedValue.Index $ProductEdition.SelectedValue.Id $Language.SelectedValue.Id $Language.SelectedValue.Language
if ($links.Length -eq 0) { if ($links.Length -eq 0) {
break break
} }
@@ -1066,8 +1133,8 @@ exit $ExitCode
# SIG # Begin signature block # SIG # Begin signature block
# MIIcQwYJKoZIhvcNAQcCoIIcNDCCHDACAQExDzANBglghkgBZQMEAgEFADB5Bgor # MIIcQwYJKoZIhvcNAQcCoIIcNDCCHDACAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCAmntMmTpBFNzz7 # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCB+fBaZ2mVh5y0g
# Fdr1eV8O1VgbNVoFgkOjlsq1UXZyy6CCCy4wggVGMIIELqADAgECAhAkaSZj72wM # 32xIb+Bor/eyDypG1v6SnGzMw3Q8uaCCCy4wggVGMIIELqADAgECAhAkaSZj72wM
# Cjsjz6MQw2SbMA0GCSqGSIb3DQEBCwUAMH0xCzAJBgNVBAYTAkdCMRswGQYDVQQI # Cjsjz6MQw2SbMA0GCSqGSIb3DQEBCwUAMH0xCzAJBgNVBAYTAkdCMRswGQYDVQQI
# ExJHcmVhdGVyIE1hbmNoZXN0ZXIxEDAOBgNVBAcTB1NhbGZvcmQxGjAYBgNVBAoT # ExJHcmVhdGVyIE1hbmNoZXN0ZXIxEDAOBgNVBAcTB1NhbGZvcmQxGjAYBgNVBAoT
# EUNPTU9ETyBDQSBMaW1pdGVkMSMwIQYDVQQDExpDT01PRE8gUlNBIENvZGUgU2ln # EUNPTU9ET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5DBVgMV4D/NogwqQg3FwjOhbiGTi # Xbcf32H4MAsGCSqGSIb3DQEBAQSCAQB26Kf/vROm6/cOAM0KxWb+EP2OmU11ccJJ
# zhJtcwdNkoazqxTi/Ys8h8uvpJO9T3VH6ifiCsk+i/NA4HkHQ6PYCYdJ6rKOge/W # bBJbIvEKpiPTs5VMx1yTY7E8es/QDY0PvQCsfSGsoGHGPhjV9EFmDmUg/wKWAPoS
# ACVNwKRdNz0W5+4yYR+W/UM6ufZ/IkLH68pm3Ld5fHK+1GkAc7POEKYIy8aIf34B # oQ3hsp8snUBLfEVQtFUSaLSxTlrrYonMCxJazsRSy7a+aZog1tEWv7MIIGf57aNi
# c5vNRL1jBKzMKX4j9B2x6RwnALcXWObN3heM4NauNqXlwEd3Hc+5DKU4bLSuQr3L # NsKm2TsV+b65T5Z0CcryZuRwA2kx/Mr1BtNf67IXR+09TZlBVtjZXDGfdNlHI1yl
# bmV7CMK2jb0kvF0WlZe8KtVrpW8OFk9h0Lt8I+6MJ7cNg/U1eJ+Mxb8Qv1oAtNr2 # DlCuh8frb5izoiWYD21hs8xx8ep2Ml4tgw7VqwzWz9tfXl3K61Y9ltnEUuY0nElr
# oOL6LLl3fzSmtroxt3gDrtUnj+BlPtQnNVg9+w7y1pohad9oiE/5 # 71llMJz6eXl1tJVcX3GCIaFb/QbWNFr1gSLC+OjvcJHh1BvXrL+W
# SIG # End signature block # SIG # End signature block

View File

@@ -1,5 +1,5 @@
Fido: Full ISO Download Script (for Windows retail ISOs) Fido: A PowerShell download script for Windows ISOs and UEFI Shell
======================================================== ==================================================================
[![Licence](https://img.shields.io/badge/license-GPLv3-blue.svg?style=flat-square)](https://www.gnu.org/licenses/gpl-3.0.en.html) [![Licence](https://img.shields.io/badge/license-GPLv3-blue.svg?style=flat-square)](https://www.gnu.org/licenses/gpl-3.0.en.html)
[![Github stats](https://img.shields.io/github/downloads/pbatard/Fido/total.svg?style=flat-square)](https://github.com/pbatard/Fido/releases) [![Github stats](https://img.shields.io/github/downloads/pbatard/Fido/total.svg?style=flat-square)](https://github.com/pbatard/Fido/releases)
@@ -9,7 +9,7 @@ Description
Fido is a PowerShell script that is primarily designed to be used in [Rufus](https://github.com/pbatard/rufus), but that Fido is a PowerShell script that is primarily designed to be used in [Rufus](https://github.com/pbatard/rufus), but that
can also be used in standalone fashion, and whose purpose is to automate access to the official Microsoft Windows retail can also be used in standalone fashion, and whose purpose is to automate access to the official Microsoft Windows retail
ISO download links. ISO download links as well as provide convenient access to bootable UEFI Shell images.
This script exists because, while Microsoft does make retail ISO download links freely and publicly available (at least This script exists because, while Microsoft does make retail ISO download links freely and publicly available (at least
for Windows 8 and Windows 10), it only does so after actively forcing users to jump through a lot of unwarranted hoops, for Windows 8 and Windows 10), it only does so after actively forcing users to jump through a lot of unwarranted hoops,
@@ -50,10 +50,9 @@ redirect you __away__ from the pages that allow you to download retail ISOs):
* https://www.microsoft.com/software-download/Windows8ISO * https://www.microsoft.com/software-download/Windows8ISO
* https://www.microsoft.com/software-download/Windows10ISO * https://www.microsoft.com/software-download/Windows10ISO
After visiting those with a full browser (Internet Explorer, running through the `Invoke-WebRequest` PowerShell Cmdlet), After checking access to these URLs, to confirm that they are accessible, the script first queries the web API from the
to confirm that they are accessible, the script then queries the web API from the Microsoft servers to first request the Microsoft servers, to request the language selection available for the version of Windows selected, and then requests
language selection available for the version of Windows selected by the user, and then request the actual download links the actual download links for all the architectures available for that language + version.
for all the architectures available for that specific combination of version + language.
Requirements Requirements
------------ ------------