Compare commits

..

1 Commits

Author SHA1 Message Date
mend-bolt-for-github[bot]
ed204fd049 Add .whitesource configuration file 2023-01-11 20:22:45 +00:00
5 changed files with 409 additions and 260 deletions

View File

@@ -2,8 +2,7 @@
root = true
[*]
trim_trailing_whitespace = true
insert_final_newline = true
# Must use a BOM else Unicode strings will not display
charset = utf-8-bom
insert_final_newline = true
indent_style = tab
trim_trailing_whitespace = true

3
.gitattributes vendored
View File

@@ -1,6 +1,3 @@
* text=auto
*.ps1 eol=crlf
*.sh eol=lf
.gitattributes export-ignore
.gitignore export-ignore
sign.sh export-ignore

14
.whitesource Normal file
View File

@@ -0,0 +1,14 @@
{
"scanSettings": {
"baseBranches": []
},
"checkRunSettings": {
"vulnerableCheckRunConclusionLevel": "failure",
"displayMode": "diff",
"useMendCheckNames": true
},
"issueSettings": {
"minSeverityLevel": "LOW",
"issueType": "DEPENDENCY"
}
}

628
Fido.ps1
View File

@@ -1,6 +1,6 @@
#
# Fido v1.57 - Feature ISO Downloader, for retail Windows images and UEFI Shell
# Copyright © 2019-2024 Pete Batard <pete@akeo.ie>
# Fido v1.40 - Feature ISO Downloader, for retail Windows images and UEFI Shell
# Copyright © 2019-2023 Pete Batard <pete@akeo.ie>
# Command line support: Copyright © 2021 flx5
# ConvertTo-ImageSource: Copyright © 2016 Chris Carter
#
@@ -27,8 +27,6 @@ param(
[string]$AppTitle = "Fido - Feature ISO Downloader",
# (Optional) '|' separated UI localization strings.
[string]$LocData,
# (Optional) Forced locale
[string]$Locale = "en-US",
# (Optional) Path to a file that should be used for the UI icon.
[string]$Icon,
# (Optional) Name of a pipe the download URL should be sent to.
@@ -45,9 +43,11 @@ param(
# (Optional) Specify Windows architecture [Toggles commandline mode]
[string]$Arch,
# (Optional) Only display the download URL [Toggles commandline mode]
[switch]$GetUrl = $false,
[switch]$GetUrl = $False,
# (Optional) Increase verbosity
[switch]$Verbose = $false
[switch]$Verbose = $False,
# (Optional) Disable the progress bar
[switch]$DisableProgress = $False
)
#endregion
@@ -55,79 +55,42 @@ try {
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
} catch {}
$Cmd = $false
$Cmd = $False
if ($Win -or $Rel -or $Ed -or $Lang -or $Arch -or $GetUrl) {
$Cmd = $true
}
# Return a decimal Windows version that we can then check for platform support.
# Note that because we don't want to have to support this script on anything
# other than Windows, this call returns 0.0 for PowerShell running on Linux/Mac.
function Get-Platform-Version()
{
$version = 0.0
$platform = [string][System.Environment]::OSVersion.Platform
# This will filter out non Windows platforms
if ($platform.StartsWith("Win")) {
# Craft a decimal numeric version of Windows
$version = [System.Environment]::OSVersion.Version.Major * 1.0 + [System.Environment]::OSVersion.Version.Minor * 0.1
}
return $version
}
$winver = Get-Platform-Version
# The default TLS for Windows 8.x doesn't work with Microsoft's servers so we must force it
if ($winver -lt 10.0) {
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls -bor [Net.SecurityProtocolType]::Tls11 -bor [Net.SecurityProtocolType]::Tls12
$Cmd = $True
}
#region Assembly Types
$Drawing_Assembly = "System.Drawing"
# PowerShell 7 altered the name of the Drawing assembly...
if ($host.version -ge "7.0") {
$Drawing_Assembly += ".Common"
}
$code = @"
[DllImport("shell32.dll", CharSet = CharSet.Auto, SetLastError = true, BestFitMapping = false, ThrowOnUnmappableChar = true)]
internal static extern int ExtractIconEx(string sFile, int iIndex, out IntPtr piLargeVersion, out IntPtr piSmallVersion, int amountIcons);
[DllImport("user32.dll")]
public static extern bool ShowWindow(IntPtr handle, int state);
$Signature = @{
Namespace = "WinAPI"
Name = "Utils"
Language = "CSharp"
UsingNamespace = "System.Runtime", "System.IO", "System.Text", "System.Drawing", "System.Globalization"
ReferencedAssemblies = $Drawing_Assembly
ErrorAction = "Stop"
WarningAction = "Ignore"
IgnoreWarnings = $true
MemberDefinition = @"
[DllImport("shell32.dll", CharSet = CharSet.Auto, SetLastError = true, BestFitMapping = false, ThrowOnUnmappableChar = true)]
internal static extern int ExtractIconEx(string sFile, int iIndex, out IntPtr piLargeVersion, out IntPtr piSmallVersion, int amountIcons);
[DllImport("user32.dll")]
public static extern bool ShowWindow(IntPtr handle, int state);
// Extract an icon from a DLL
public static Icon ExtractIcon(string file, int number, bool largeIcon) {
IntPtr large, small;
ExtractIconEx(file, number, out large, out small, 1);
try {
return Icon.FromHandle(largeIcon ? large : small);
} catch {
return null;
}
// Extract an icon from a DLL
public static Icon ExtractIcon(string file, int number, bool largeIcon)
{
IntPtr large, small;
ExtractIconEx(file, number, out large, out small, 1);
try {
return Icon.FromHandle(largeIcon ? large : small);
} catch {
return null;
}
}
"@
}
if (!$Cmd) {
Write-Host Please Wait...
if (!("WinAPI.Utils" -as [type]))
{
Add-Type @Signature
$Drawing_Assembly = "System.Drawing"
# PowerShell 7 altered the name of the Drawing assembly...
if ($host.version -ge "7.0") {
$Drawing_Assembly += ".Common"
}
Add-Type -ErrorAction Stop -WarningAction Ignore -IgnoreWarnings -MemberDefinition $code -Namespace Gui -UsingNamespace System.Runtime, System.IO, System.Text, System.Drawing, System.Globalization -ReferencedAssemblies $Drawing_Assembly -Name Utils
Add-Type -AssemblyName PresentationFramework
# Hide the powershell window: https://stackoverflow.com/a/27992426/1069307
[WinAPI.Utils]::ShowWindow(([System.Diagnostics.Process]::GetCurrentProcess() | Get-Process).MainWindowHandle, 0) | Out-Null
[Gui.Utils]::ShowWindow(([System.Diagnostics.Process]::GetCurrentProcess() | Get-Process).MainWindowHandle, 0) | Out-Null
}
#endregion
@@ -138,19 +101,169 @@ $WindowsVersions = @(
@(
@("Windows 11", "windows11"),
@(
"23H2 v2 (Build 22631.2861 - 2023.12)",
@("Windows 11 Home/Pro/Edu", 2935),
@("Windows 11 Home China ", ($zh + 2936))
"22H2 v1 (Build 22621.525 - 2022.10)",
@("Windows 11 Home/Pro/Edu", 2370),
@("Windows 11 Home China ", ($zh + 2371))
),
@(
"21H2 v1 (Build 22000.318 - 2021.11)",
@("Windows 11 Home/Pro/Edu", 2093),
@("Windows 11 Home China ", ($zh + 2094))
),
@(
"21H2 (Build 22000.194 - 2021.10)",
@("Windows 11 Home/Pro/Edu", 2069),
@("Windows 11 Home China ", ($zh + 2070))
)
),
@(
@("Windows 10", "Windows10ISO"),
@(
"22H2 v1 (Build 19045.2965 - 2023.05)",
@("Windows 10 Home/Pro/Edu", 2618),
"22H2 (Build 19045.2006 - 2022.10)",
@("Windows 10 Home/Pro/Edu", 2377),
@("Windows 10 Home China ", ($zh + 2378))
),
@(
"21H2 (Build 19044.1288 - 2021.11)",
@("Windows 10 Home/Pro/Edu", 2084),
@("Windows 10 Home China ", ($zh + 2085))
),
@(
"21H1 (Build 19043.985 - 2021.05)",
@("Windows 10 Home/Pro", 2033),
@("Windows 10 Education", 2032),
@("Windows 10 Home China ", ($zh + 2034))
),
@(
"20H2 (Build 19042.631 - 2020.12)",
@("Windows 10 Home/Pro", 1882),
@("Windows 10 Education", 1884),
@("Windows 10 Home China ", ($zh + 1883))
),
@(
"20H2 (Build 19042.508 - 2020.10)",
@("Windows 10 Home/Pro", 1807),
@("Windows 10 Education", 1805),
@("Windows 10 Home China ", ($zh + 1806))
),
@(
"20H1 (Build 19041.264 - 2020.05)",
@("Windows 10 Home/Pro", 1626),
@("Windows 10 Education", 1625),
@("Windows 10 Home China ", ($zh + 1627))
),
@(
"19H2 (Build 18363.418 - 2019.11)",
@("Windows 10 Home/Pro", 1429),
@("Windows 10 Education", 1431),
@("Windows 10 Home China ", ($zh + 1430))
),
@(
"19H1 (Build 18362.356 - 2019.09)",
@("Windows 10 Home/Pro", 1384),
@("Windows 10 Education", 1386),
@("Windows 10 Home China ", ($zh + 1385))
),
@(
"19H1 (Build 18362.30 - 2019.05)",
@("Windows 10 Home/Pro", 1214),
@("Windows 10 Education", 1216),
@("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)",
@("Windows 10 Home/Pro", 1060),
@("Windows 10 Education", 1056),
@("Windows 10 Home China ", ($zh + 1061))
),
@(
"1809 R1 (Build 17763.1 - 2018.09)",
@("Windows 10 Home/Pro", 1019),
@("Windows 10 Education", 1021),
@("Windows 10 Home China ", ($zh + 1020))
),
@(
"1803 (Build 17134.1 - 2018.04)",
@("Windows 10 Home/Pro", 651),
@("Windows 10 Education", 655),
@("Windows 10 1803", 637),
@("Windows 10 Home China", ($zh + 652))
),
@(
"1709 (Build 16299.15 - 2017.09)",
@("Windows 10 Home/Pro", 484),
@("Windows 10 Education", 488),
@("Windows 10 Home China", ($zh + 485))
),
@(
"1703 [Redstone 2] (Build 15063.0 - 2017.03)",
@("Windows 10 Home/Pro", 361),
@("Windows 10 Home/Pro N", 362),
@("Windows 10 Single Language", 363),
@("Windows 10 Education", 423),
@("Windows 10 Education N", 424),
@("Windows 10 Home China", ($zh + 364))
),
@(
"1607 [Redstone 1] (Build 14393.0 - 2016.07)",
@("Windows 10 Home/Pro", 244),
@("Windows 10 Home/Pro N", 245),
@("Windows 10 Single Language", 246),
@("Windows 10 Education", 242),
@("Windows 10 Education N", 243),
@("Windows 10 China Get Genuine", ($zh + 247))
),
@(
"1511 R3 [Threshold 2] (Build 10586.164 - 2016.04)",
@("Windows 10 Home/Pro", 178),
@("Windows 10 Home/Pro N", 183),
@("Windows 10 Single Language", 184),
@("Windows 10 Education", 179),
@("Windows 10 Education N", 181),
@("Windows 10 KN", ($ko + 182)),
@("Windows 10 Education KN", ($ko + 180)),
@("Windows 10 China Get Genuine", ($zh + 185))
),
@(
"1511 R2 [Threshold 2] (Build 10586.104 - 2016.02)",
@("Windows 10 Home/Pro", 109),
@("Windows 10 Home/Pro N", 115),
@("Windows 10 Single Language", 116),
@("Windows 10 Education", 110),
@("Windows 10 Education N", 112),
@("Windows 10 KN", ($ko + 114)),
@("Windows 10 Education KN", ($ko + 111)),
@("Windows 10 China Get Genuine", ($zh + 113))
),
@(
"1511 R1 [Threshold 2] (Build 10586.0 - 2015.11)",
@("Windows 10 Home/Pro", 99),
@("Windows 10 Home/Pro N", 105),
@("Windows 10 Single Language", 106),
@("Windows 10 Education", 100),
@("Windows 10 Education N", 102),
@("Windows 10 KN", ($ko + 104)),
@("Windows 10 Education KN", ($ko + 101)),
@("Windows 10 China Get Genuine", ($zh + 103))
),
@(
"1507 [Threshold 1] (Build 10240.16384 - 2015.07)",
@("Windows 10 Home/Pro", 79),
@("Windows 10 Home/Pro N", 81),
@("Windows 10 Single Language", 82),
@("Windows 10 Education", 75)
@("Windows 10 Education N", 77),
@("Windows 10 KN", ($ko + 80)),
@("Windows 10 Education KN", ($ko + 76)),
@("Windows 10 China Get Genuine", ($zh + 78))
)
)
),
@(
@("Windows 8.1", "windows8ISO"),
@(
@@ -162,23 +275,17 @@ $WindowsVersions = @(
@("Windows 8.1 KN", ($ko + 62))
)
),
@(
@("Windows 7", "WIN7"),
@(
"with SP1 (build 7601)",
@("Windows 7 Ultimate", 0),
@("Windows 7 Professional", 1),
@("Windows 7 Home Premium", 2)
)
),
@(
@("UEFI Shell 2.2", "UEFI_SHELL 2.2"),
@(
"24H1 (edk2-stable202405)",
@("Release", 0),
@("Debug", 1)
),
@(
"23H2 (edk2-stable202311)",
@("Release", 0),
@("Debug", 1)
),
@(
"23H1 (edk2-stable202305)",
@("Release", 0),
@("Debug", 1)
),
@(
"22H2 (edk2-stable202211)",
@("Release", 0),
@@ -206,13 +313,49 @@ $WindowsVersions = @(
)
),
@(
@("UEFI Shell 2.0", "UEFI_SHELL 2.0"),
@("UEFI Shell 2.0", "UEFI_SHELL 2.0"),
@(
"4.632 [20100426]",
@("Release", 0)
)
)
)
$Windows7Versions = @(
# 0: Windows 7 Ultimate
@(
# Need a dummy to prevent PS from coalescing single array entries
@(""),
@("English (US)", "en-us",
@(
@("x64", "https://download.microsoft.com/download/5/1/9/5195A765-3A41-4A72-87D8-200D897CBE21/7601.24214.180801-1700.win7sp1_ldr_escrow_CLIENT_ULTIMATE_x64FRE_en-us.iso"),
@("x86", "https://download.microsoft.com/download/1/E/6/1E6B4803-DD2A-49DF-8468-69C0E6E36218/7601.24214.180801-1700.win7sp1_ldr_escrow_CLIENT_ULTIMATE_x86FRE_en-us.iso")
)
)
),
# 1: Windows 7 Profesional
@(
@(""),
@("English (US)", "en-us",
@(
@("x64", "https://download.microsoft.com/download/0/6/3/06365375-C346-4D65-87C7-EE41F55F736B/7601.24214.180801-1700.win7sp1_ldr_escrow_CLIENT_PROFESSIONAL_x64FRE_en-us.iso"),
@("x86", "https://download.microsoft.com/download/C/0/6/C067D0CD-3785-4727-898E-60DC3120BB14/7601.24214.180801-1700.win7sp1_ldr_escrow_CLIENT_PROFESSIONAL_x86FRE_en-us.iso")
)
)
),
# 2: Windows 7 Home Premium
@(
@(""),
@("English (US)", "en-us",
@(
@("x64", "https://download.microsoft.com/download/E/A/8/EA804D86-C3DF-4719-9966-6A66C9306598/7601.24214.180801-1700.win7sp1_ldr_escrow_CLIENT_HOMEPREMIUM_x64FRE_en-us.iso"),
@("x86", "https://download.microsoft.com/download/E/D/A/EDA6B508-7663-4E30-86F9-949932F443D0/7601.24214.180801-1700.win7sp1_ldr_escrow_CLIENT_HOMEPREMIUM_x86FRE_en-us.iso")
)
)
)
)
#endregion
#region Functions
@@ -262,9 +405,9 @@ function Select-Language([string]$LangName)
($SysLocale.StartsWith("tr") -and $LangName -like "*Turk*") -or `
($SysLocale.StartsWith("uk") -and $LangName -like "*Ukrain*") -or `
($SysLocale.StartsWith("vi") -and $LangName -like "*Vietnam*")) {
return $true
return $True
}
return $false
return $False
}
function Add-Entry([int]$pos, [string]$Name, [array]$Items, [string]$DisplayName)
@@ -357,7 +500,7 @@ function ConvertTo-ImageSource
function Throw-Error([object]$Req, [string]$Alt)
{
$Err = $(GetElementById -Request $Req -Id "errorModalMessage").innerText -replace "<[^>]+>" -replace "\s+", " "
if (!$Err) {
if (-not $Err) {
$Err = $Alt
} else {
$Err = [System.Text.Encoding]::UTF8.GetString([byte[]][char[]]$Err)
@@ -368,7 +511,7 @@ function Throw-Error([object]$Req, [string]$Alt)
# Translate a message string
function Get-Translation([string]$Text)
{
if (!($English -contains $Text)) {
if (-not $English -contains $Text) {
Write-Host "Error: '$Text' is not a translatable string"
return "(Untranslated)"
}
@@ -406,7 +549,7 @@ function Error([string]$ErrorMessage)
if (!$Cmd) {
$XMLForm.Title = $(Get-Translation("Error")) + ": " + $ErrorMessage
Refresh-Control($XMLForm)
$XMLGrid.Children[2 * $script:Stage + 1].IsEnabled = $true
$XMLGrid.Children[2 * $script:Stage + 1].IsEnabled = $True
$UserInput = [System.Windows.MessageBox]::Show($XMLForm.Title, $(Get-Translation("Error")), "OK", "Error")
$script:ExitCode = $script:Stage--
} else {
@@ -442,7 +585,6 @@ function Get-RandomDate()
#region Globals
$ErrorActionPreference = "Stop"
$DefaultTimeout = 30
$dh = 58
$Stage = 0
$SelectedIndex = 0
@@ -453,7 +595,7 @@ if ($Cmd) {
$MaxStage = 4
$SessionId = [guid]::NewGuid()
$ExitCode = 100
$Locale = $Locale
$Locale = "en-US"
$RequestData = @{}
# This GUID applies to all visitors, regardless of their locale
$RequestData["GetLangs"] = @("a8f8f489-4c7f-463a-9ca6-5cff94d8d041", "getskuinformationbyproductedition" )
@@ -476,24 +618,29 @@ if ($Cmd) {
# Localization
$EnglishMessages = "en-US|Version|Release|Edition|Language|Architecture|Download|Continue|Back|Close|Cancel|Error|Please wait...|" +
"Download using a browser|Download of Windows ISOs is unavailable due to Microsoft having altered their website to prevent it.|" +
"PowerShell 3.0 or later is required to run this script.|Do you want to go online and download it?|" +
"This feature is not available on this platform."
"PowerShell 3.0 or later is required to run this script.|Do you want to go online and download it?"
[string[]]$English = $EnglishMessages.Split('|')
[string[]]$Localized = $null
if ($LocData -and !$LocData.StartsWith("en-US")) {
if ($LocData -and (-not $LocData.StartsWith("en-US"))) {
$Localized = $LocData.Split('|')
# Adjust the $Localized array if we have more or fewer strings than in $EnglishMessages
if ($Localized.Length -lt $English.Length) {
while ($Localized.Length -ne $English.Length) {
$Localized += $English[$Localized.Length]
}
} elseif ($Localized.Length -gt $English.Length) {
$Localized = $LocData.Split('|')[0..($English.Length - 1)]
if ($Localized.Length -ne $English.Length) {
Write-Host "Error: Missing or extra translated messages provided ($($Localized.Length)/$($English.Length))"
exit 101
}
$Locale = $Localized[0]
}
$QueryLocale = $Locale
# Make sure PowerShell 3.0 or later is used (for Invoke-WebRequest)
if ($PSVersionTable.PSVersion.Major -lt 3) {
Write-Host Error: PowerShell 3.0 or later is required to run this script.
$Msg = "$(Get-Translation($English[15]))`n$(Get-Translation($English[16]))"
if ([System.Windows.MessageBox]::Show($Msg, $(Get-Translation("Error")), "YesNo", "Error") -eq "Yes") {
Start-Process -FilePath https://www.microsoft.com/download/details.aspx?id=34595
}
exit 102
}
# Convert a size in bytes to a human readable string
function Size-To-Human-Readable([uint64]$size)
{
@@ -507,25 +654,14 @@ function Size-To-Human-Readable([uint64]$size)
}
# Check if the locale we want is available - Fall back to en-US otherwise
function Check-Locale
{
function Check-Locale {
try {
$url = "https://www.microsoft.com/" + $QueryLocale + "/software-download/"
if ($Verbosity -ge 2) {
Write-Host Querying $url
}
# Looks Microsoft are filtering our script according to the first query it performs with the spoofed user agent.
# So, to continue this pointless cat and mouse game, we simply add an extra first query with the default user agent.
# Also: "Hi Microsoft. You sure have A LOT OF RESOURCES TO WASTE to have assigned folks of yours to cripple scripts
# that merely exist because you have chosen to make the user experience from your download website utterly subpar.
# And while I am glad senpai noticed me (UwU), I feel compelled to ask: Don't you guys have better things to do?"
Invoke-WebRequest -UseBasicParsing -TimeoutSec $DefaultTimeout -MaximumRedirection 0 $url | Out-Null
Invoke-WebRequest -UseBasicParsing -TimeoutSec $DefaultTimeout -MaximumRedirection 0 -UserAgent $UserAgent $url | Out-Null
Invoke-WebRequest -UseBasicParsing -MaximumRedirection 0 -UserAgent $UserAgent $url | Out-Null
} catch {
# Of course PowerShell 7 had to BREAK $_.Exception.Status on timeouts...
if ($_.Exception.Status -eq "Timeout" -or $_.Exception.GetType().Name -eq "TaskCanceledException") {
Write-Host Operation Timed out
}
$script:QueryLocale = "en-US"
}
}
@@ -580,7 +716,7 @@ function Get-Windows-Languages([int]$SelectedVersion, [int]$SelectedEdition)
Write-Host Querying $url
}
try {
Invoke-WebRequest -UseBasicParsing -TimeoutSec $DefaultTimeout -MaximumRedirection 0 -UserAgent $UserAgent $url | Out-Null
Invoke-WebRequest -UseBasicParsing -MaximumRedirection 0 -UserAgent $UserAgent $url | Out-Null
} catch {
Error($_.Exception.Message)
return @()
@@ -599,12 +735,11 @@ function Get-Windows-Languages([int]$SelectedVersion, [int]$SelectedEdition)
$script:SelectedIndex = 0
try {
$r = Invoke-WebRequest -Method Post -UseBasicParsing -TimeoutSec $DefaultTimeout -UserAgent $UserAgent -SessionVariable "Session" $url
$r = Invoke-WebRequest -Method Post -UseBasicParsing -UserAgent $UserAgent -SessionVariable "Session" $url
if ($r -match "errorModalMessage") {
Throw-Error -Req $r -Alt "Could not retrieve languages from server"
}
$r = $r -replace "`n" -replace "`r"
$pattern = '.*<select id="product-languages"[^>]*>(.*)</select>.*'
$pattern = '(?s)<select id="product-languages">(.*)?</select>'
$html = [regex]::Match($r, $pattern).Groups[1].Value
# Go through an XML conversion to keep all PowerShells happy...
$html = $html.Replace("selected value", "value")
@@ -655,7 +790,7 @@ function Get-Windows-Download-Links([int]$SelectedVersion, [int]$SelectedRelease
$xml = New-Object System.Xml.XmlDocument
if ($Verbosity -ge 2) {
Write-Host Querying $url
}
}
$xml.Load($url)
$sep = ""
$archs = ""
@@ -689,14 +824,24 @@ function Get-Windows-Download-Links([int]$SelectedVersion, [int]$SelectedRelease
$Is64 = [Environment]::Is64BitOperatingSystem
# Must add a referer for this request, else Microsoft's servers will deny it
$ref = "https://www.microsoft.com/software-download/windows11"
$r = Invoke-WebRequest -Method Post -Headers @{ "Referer" = $ref } -UseBasicParsing -TimeoutSec $DefaultTimeout -UserAgent $UserAgent -WebSession $Session $url
$wr = [System.Net.WebRequest]::Create($url)
# Windows 7 PowerShell doesn't support 'Invoke-WebRequest -Headers @{"Referer" = $ref}'
# (produces "The 'Referer' header must be modified using the appropriate property or method")
# so we use StreamReader() with GetResponseStream() and do this whole gymkhana instead...
$wr.Method = "POST"
$wr.Referer = $ref
$wr.UserAgent = $UserAgent
$wr.ContentLength = 0
$sr = New-Object System.IO.StreamReader($wr.GetResponse().GetResponseStream())
$r = $sr.ReadToEnd()
if ($r -match "errorModalMessage") {
$Alt = [regex]::Match($r.Content, '<p id="errorModalMessage">(.+?)<\/p>').Groups[1].Value -replace "<[^>]+>" -replace "\s+", " " -replace "\?\?\?", "-"
$Alt = [System.Text.Encoding]::UTF8.GetString([byte[]][char[]]$Alt)
if (!$Alt) {
$regex = New-Object Text.RegularExpressions.Regex '<p id="errorModalMessage">(.+?)<\/p>'
$m = $regex.Match($r)
# Make the typical error message returned by Microsoft's servers more presentable
$Alt = $m.Groups[1] -replace "<[^>]+>" -replace "\s+", " "
$Alt += " " + $SessionId + "."
if (-not $Alt) {
$Alt = "Could not retrieve architectures from server"
} elseif ($Alt -match "715-123130") {
$Alt += " " + $SessionId + "."
}
Throw-Error -Req $r -Alt $Alt
}
@@ -713,7 +858,7 @@ function Get-Windows-Download-Links([int]$SelectedVersion, [int]$SelectedRelease
foreach ($var in $xml.inputs.input) {
$json = $var.value | ConvertFrom-Json;
if ($json) {
if (($Is64 -and $json.DownloadType -eq "x64") -or (!$Is64 -and $json.DownloadType -eq "x86")) {
if (($Is64 -and $json.DownloadType -eq "x64") -or (-not $Is64 -and $json.DownloadType -eq "x86")) {
$script:SelectedIndex = $i
}
$links += @(New-Object PsObject -Property @{ Type = $json.DownloadType; Link = $json.Uri })
@@ -735,18 +880,21 @@ function Get-Windows-Download-Links([int]$SelectedVersion, [int]$SelectedRelease
function Process-Download-Link([string]$Url)
{
try {
if ($PipeName -and !$Check.IsChecked) {
if ($PipeName -and -not $Check.IsChecked) {
Send-Message -PipeName $PipeName -Message $Url
} else {
if ($Cmd) {
$pattern = '.*\/(.*\.iso).*'
$File = [regex]::Match($Url, $pattern).Groups[1].Value
# PowerShell implicit conversions are iffy, so we need to force them...
$str_size = (Invoke-WebRequest -UseBasicParsing -TimeoutSec $DefaultTimeout -Uri $Url -Method Head).Headers.'Content-Length'
$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)..."
Start-BitsTransfer -Source $Url -Destination $File
if ($DisableProgress) {
$ProgressPreference = 'SilentlyContinue'
}
Invoke-WebRequest -UseBasicParsing -Uri $Url -OutFile $File
} else {
Write-Host Download Link: $Url
Start-Process -FilePath $Url
@@ -767,12 +915,6 @@ if ($Cmd) {
$winLanguageName = $null
$winLink = $null
# Windows 7 and non Windows platforms are too much of a liability
if ($winver -le 6.1) {
Error(Get-Translation("This feature is not available on this platform."))
exit 403
}
$i = 0
$Selected = ""
if ($Win -eq "List") {
@@ -931,7 +1073,7 @@ $XMLForm.Title = $AppTitle
if ($Icon) {
$XMLForm.Icon = $Icon
} else {
$XMLForm.Icon = [WinAPI.Utils]::ExtractIcon("imageres.dll", -5205, $true) | ConvertTo-ImageSource
$XMLForm.Icon = [Gui.Utils]::ExtractIcon("imageres.dll", -5205, $true) | ConvertTo-ImageSource
}
if ($Locale.StartsWith("ar") -or $Locale.StartsWith("fa") -or $Locale.StartsWith("he")) {
$XMLForm.FlowDirection = "RightToLeft"
@@ -940,12 +1082,6 @@ $WindowsVersionTitle.Text = Get-Translation("Version")
$Continue.Content = Get-Translation("Continue")
$Back.Content = Get-Translation("Close")
# Windows 7 and non Windows platforms are too much of a liability
if ($winver -le 6.1) {
Error(Get-Translation("This feature is not available on this platform."))
exit 403
}
# Populate the Windows versions
$i = 0
$versions = @()
@@ -959,9 +1095,9 @@ $WindowsVersion.DisplayMemberPath = "Version"
# Button Action
$Continue.add_click({
$script:Stage++
$XMLGrid.Children[2 * $Stage + 1].IsEnabled = $false
$Continue.IsEnabled = $false
$Back.IsEnabled = $false
$XMLGrid.Children[2 * $Stage + 1].IsEnabled = $False
$Continue.IsEnabled = $False
$Back.IsEnabled = $False
Refresh-Control($Continue)
Refresh-Control($Back)
@@ -970,7 +1106,7 @@ $Continue.add_click({
1 { # Windows Version selection
$XMLForm.Title = Get-Translation($English[12])
Refresh-Control($XMLForm)
if ($WindowsVersion.SelectedValue.Version.StartsWith("Windows")) {
if ($WindowsVersion.SelectedValue.Version.StartsWith("Windows") -and $WindowsVersion.SelectedValue.Version -ne "Windows 7") {
Check-Locale
}
$releases = Get-Windows-Releases $WindowsVersion.SelectedValue.Index
@@ -1029,9 +1165,9 @@ $Continue.add_click({
$XMLForm.Close()
}
}
$Continue.IsEnabled = $true
$Continue.IsEnabled = $True
if ($Stage -ge 0) {
$Back.IsEnabled = $true
$Back.IsEnabled = $True
}
})
@@ -1041,7 +1177,7 @@ $Back.add_click({
} else {
$XMLGrid.Children.RemoveAt(2 * $Stage + 3)
$XMLGrid.Children.RemoveAt(2 * $Stage + 2)
$XMLGrid.Children[2 * $Stage + 1].IsEnabled = $true
$XMLGrid.Children[2 * $Stage + 1].IsEnabled = $True
$dh2 = $dh
if ($Stage -eq 4 -and $PipeName) {
$Check.Visibility = "Collapsed"
@@ -1066,17 +1202,17 @@ $Back.add_click({
})
# Display the dialog
$XMLForm.Add_Loaded({$XMLForm.Activate()})
$XMLForm.Add_Loaded( { $XMLForm.Activate() } )
$XMLForm.ShowDialog() | Out-Null
# Clean up & exit
exit $ExitCode
# SIG # Begin signature block
# MIIkWAYJKoZIhvcNAQcCoIIkSTCCJEUCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# MIIkWQYJKoZIhvcNAQcCoIIkSjCCJEYCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JN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i/puTeDBafarunOPzXIV
# SIG # End signature block

View File

@@ -56,7 +56,12 @@ the actual download links, for all the architectures available for that language
Requirements
------------
Windows 8 or later with PowerShell. Windows 7 is __not__ supported.
PowerShell 3.0 or later is required. However the script should detect if you are using an older version and point you to
the relevant PowerShell 3.0 download page if needed (which should only ever occur if you are running a vanilla version
of Windows 7).
Note that the current version of the script does not need Internet Explorer to be installed and should also work with
PowerShell 7.
Commandline mode
----------------
@@ -64,27 +69,25 @@ Commandline mode
Fido supports commandline mode whereas, whenever one of the following options is provided, a GUI is not instantiated
and you can instead generate the ISO download from within a PowerShell console or script.
Note however that, as of 2023.05, Microsoft has removed access to older releases of Windows ISOs and as a result, the
list of releases that can be downloaded from Fido has had to be reduced to only the latest for each version.
The options are:
- `Win`: Specify Windows version (e.g. _"Windows 10"_). Abbreviated version should work as well (e.g `-Win 10`) as long
as it is unique enough. If this option isn't specified, the most recent version of Windows is automatically selected.
as it is unique enough. If this option isn't specified, the most recent version of Windows is automatically selected.
You can obtain a list of supported versions by specifying `-Win List`.
- `Rel`: Specify Windows release (e.g. _"21H1"_). If this option isn't specified, the most recent release for the chosen
version of Windows is automatically selected. You can also use `-Rel Latest` to force the most recent to be used.
You can obtain a list of supported versions by specifying `-Rel List`.
- `Ed`: Specify Windows edition (e.g. _"Pro/Home"_). Abbreviated editions should work as well (e.g `-Ed Pro`) as long
as it is unique enough. If this option isn't specified, the most recent version of Windows is automatically selected.
as it is unique enough. If this option isn't specified, the most recent version of Windows is automatically selected.
You can obtain a list of supported versions by specifying `-Ed List`.
- `Lang`: Specify Windows language (e.g. _"Arabic"_). Abbreviated or part of a language (e.g. `-Lang Int` for
`English International`) should work as long as it's unique enough. If this option isn't specified, the script attempts
to select the same language as the system locale.
to select the same language as the system locale.
You can obtain a list of supported languages by specifying `-Lang List`.
- `Arch`: Specify Windows architecture (e.g. _"x64"_). If this option isn't specified, the script attempts to use the same
architecture as the one from the current system.
- `GetUrl`: By default, the script attempts to automatically launch the download. But when using the `-GetUrl` switch,
the script only displays the download URL, which can then be piped into another command or into a file.
- `DisableProgress`: Disable progress report. This may speed up downloads when using the command line.
Examples of a commandline download:
@@ -124,7 +127,7 @@ Additional Notes
Because of its intended usage with Rufus, this script is not designed to cover every possible retail ISO downloads.
Instead we mostly chose the ones that the general public is likely to request. For instance, we currently have no plan
to add support for LTSB/LTSC Windows ISOs downloads.
to add support for LTSB/LTSC Windows 10 ISOs downloads.
If you are interested in such downloads, then you are kindly invited to visit the relevant download pages from Microsoft
such as [this one](https://www.microsoft.com/evalcenter/evaluate-windows-10-enterprise) for LTSC versions.