mirror of
https://github.com/pbatard/Fido.git
synced 2025-09-16 14:18:02 +02:00
Compare commits
12 Commits
whitesourc
...
v1.47
Author | SHA1 | Date | |
---|---|---|---|
![]() |
a99f8a10d3 | ||
![]() |
146eec8673 | ||
![]() |
e9a0a367d9 | ||
![]() |
0b0643abc8 | ||
![]() |
1d88deac7c | ||
![]() |
9025d258e8 | ||
![]() |
425eb4da24 | ||
![]() |
10acbf9f84 | ||
![]() |
4b24ae5795 | ||
![]() |
2ca0f62f53 | ||
![]() |
448cfa72cf | ||
![]() |
9552df66d5 |
@@ -2,7 +2,8 @@
|
|||||||
root = true
|
root = true
|
||||||
|
|
||||||
[*]
|
[*]
|
||||||
trim_trailing_whitespace = true
|
|
||||||
insert_final_newline = true
|
|
||||||
# Must use a BOM else Unicode strings will not display
|
# Must use a BOM else Unicode strings will not display
|
||||||
charset = utf-8-bom
|
charset = utf-8-bom
|
||||||
|
insert_final_newline = true
|
||||||
|
indent_style = tab
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
3
.gitattributes
vendored
3
.gitattributes
vendored
@@ -1,3 +1,6 @@
|
|||||||
* text=auto
|
* text=auto
|
||||||
*.ps1 eol=crlf
|
*.ps1 eol=crlf
|
||||||
*.sh eol=lf
|
*.sh eol=lf
|
||||||
|
.gitattributes export-ignore
|
||||||
|
.gitignore export-ignore
|
||||||
|
sign.sh export-ignore
|
||||||
|
449
Fido.ps1
449
Fido.ps1
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Fido v1.40 - Feature ISO Downloader, for retail Windows images and UEFI Shell
|
# Fido v1.47 - Feature ISO Downloader, for retail Windows images and UEFI Shell
|
||||||
# Copyright © 2019-2023 Pete Batard <pete@akeo.ie>
|
# Copyright © 2019-2023 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
|
||||||
@@ -27,6 +27,8 @@ param(
|
|||||||
[string]$AppTitle = "Fido - Feature ISO Downloader",
|
[string]$AppTitle = "Fido - Feature ISO Downloader",
|
||||||
# (Optional) '|' separated UI localization strings.
|
# (Optional) '|' separated UI localization strings.
|
||||||
[string]$LocData,
|
[string]$LocData,
|
||||||
|
# (Optional) Forced locale
|
||||||
|
[string]$Locale = "en-US",
|
||||||
# (Optional) Path to a file that should be used for the UI icon.
|
# (Optional) Path to a file that should be used for the UI icon.
|
||||||
[string]$Icon,
|
[string]$Icon,
|
||||||
# (Optional) Name of a pipe the download URL should be sent to.
|
# (Optional) Name of a pipe the download URL should be sent to.
|
||||||
@@ -43,11 +45,9 @@ param(
|
|||||||
# (Optional) Specify Windows architecture [Toggles commandline mode]
|
# (Optional) Specify Windows architecture [Toggles commandline mode]
|
||||||
[string]$Arch,
|
[string]$Arch,
|
||||||
# (Optional) Only display the download URL [Toggles commandline mode]
|
# (Optional) Only display the download URL [Toggles commandline mode]
|
||||||
[switch]$GetUrl = $False,
|
[switch]$GetUrl = $false,
|
||||||
# (Optional) Increase verbosity
|
# (Optional) Increase verbosity
|
||||||
[switch]$Verbose = $False,
|
[switch]$Verbose = $false
|
||||||
# (Optional) Disable the progress bar
|
|
||||||
[switch]$DisableProgress = $False
|
|
||||||
)
|
)
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@@ -55,42 +55,78 @@ try {
|
|||||||
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
|
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
|
||||||
} catch {}
|
} catch {}
|
||||||
|
|
||||||
$Cmd = $False
|
$Cmd = $false
|
||||||
if ($Win -or $Rel -or $Ed -or $Lang -or $Arch -or $GetUrl) {
|
if ($Win -or $Rel -or $Ed -or $Lang -or $Arch -or $GetUrl) {
|
||||||
$Cmd = $True
|
$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
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Assembly Types
|
#region Assembly Types
|
||||||
$code = @"
|
$Drawing_Assembly = "System.Drawing"
|
||||||
[DllImport("shell32.dll", CharSet = CharSet.Auto, SetLastError = true, BestFitMapping = false, ThrowOnUnmappableChar = true)]
|
# PowerShell 7 altered the name of the Drawing assembly...
|
||||||
internal static extern int ExtractIconEx(string sFile, int iIndex, out IntPtr piLargeVersion, out IntPtr piSmallVersion, int amountIcons);
|
if ($host.version -ge "7.0") {
|
||||||
[DllImport("user32.dll")]
|
$Drawing_Assembly += ".Common"
|
||||||
public static extern bool ShowWindow(IntPtr handle, int state);
|
}
|
||||||
|
|
||||||
// Extract an icon from a DLL
|
$Signature = @{
|
||||||
public static Icon ExtractIcon(string file, int number, bool largeIcon)
|
Namespace = "WinAPI"
|
||||||
{
|
Name = "Utils"
|
||||||
IntPtr large, small;
|
Language = "CSharp"
|
||||||
ExtractIconEx(file, number, out large, out small, 1);
|
UsingNamespace = "System.Runtime", "System.IO", "System.Text", "System.Drawing", "System.Globalization"
|
||||||
try {
|
ReferencedAssemblies = $Drawing_Assembly
|
||||||
return Icon.FromHandle(largeIcon ? large : small);
|
ErrorAction = "Stop"
|
||||||
} catch {
|
WarningAction = "Ignore"
|
||||||
return null;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
"@
|
"@
|
||||||
|
}
|
||||||
|
|
||||||
if (!$Cmd) {
|
if (!$Cmd) {
|
||||||
Write-Host Please Wait...
|
Write-Host Please Wait...
|
||||||
$Drawing_Assembly = "System.Drawing"
|
|
||||||
# PowerShell 7 altered the name of the Drawing assembly...
|
if (!("WinAPI.Utils" -as [type]))
|
||||||
if ($host.version -ge "7.0") {
|
{
|
||||||
$Drawing_Assembly += ".Common"
|
Add-Type @Signature
|
||||||
}
|
}
|
||||||
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
|
Add-Type -AssemblyName PresentationFramework
|
||||||
|
|
||||||
# Hide the powershell window: https://stackoverflow.com/a/27992426/1069307
|
# Hide the powershell window: https://stackoverflow.com/a/27992426/1069307
|
||||||
[Gui.Utils]::ShowWindow(([System.Diagnostics.Process]::GetCurrentProcess() | Get-Process).MainWindowHandle, 0) | Out-Null
|
[WinAPI.Utils]::ShowWindow(([System.Diagnostics.Process]::GetCurrentProcess() | Get-Process).MainWindowHandle, 0) | Out-Null
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@@ -104,16 +140,6 @@ $WindowsVersions = @(
|
|||||||
"22H2 v1 (Build 22621.525 - 2022.10)",
|
"22H2 v1 (Build 22621.525 - 2022.10)",
|
||||||
@("Windows 11 Home/Pro/Edu", 2370),
|
@("Windows 11 Home/Pro/Edu", 2370),
|
||||||
@("Windows 11 Home China ", ($zh + 2371))
|
@("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))
|
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
@(
|
@(
|
||||||
@@ -122,148 +148,8 @@ $WindowsVersions = @(
|
|||||||
"22H2 (Build 19045.2006 - 2022.10)",
|
"22H2 (Build 19045.2006 - 2022.10)",
|
||||||
@("Windows 10 Home/Pro/Edu", 2377),
|
@("Windows 10 Home/Pro/Edu", 2377),
|
||||||
@("Windows 10 Home China ", ($zh + 2378))
|
@("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"),
|
@("Windows 8.1", "windows8ISO"),
|
||||||
@(
|
@(
|
||||||
@@ -275,15 +161,6 @@ $WindowsVersions = @(
|
|||||||
@("Windows 8.1 KN", ($ko + 62))
|
@("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"),
|
@("UEFI Shell 2.2", "UEFI_SHELL 2.2"),
|
||||||
@(
|
@(
|
||||||
@@ -313,49 +190,13 @@ $WindowsVersions = @(
|
|||||||
)
|
)
|
||||||
),
|
),
|
||||||
@(
|
@(
|
||||||
@("UEFI Shell 2.0", "UEFI_SHELL 2.0"),
|
@("UEFI Shell 2.0", "UEFI_SHELL 2.0"),
|
||||||
@(
|
@(
|
||||||
"4.632 [20100426]",
|
"4.632 [20100426]",
|
||||||
@("Release", 0)
|
@("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
|
#endregion
|
||||||
|
|
||||||
#region Functions
|
#region Functions
|
||||||
@@ -405,9 +246,9 @@ function Select-Language([string]$LangName)
|
|||||||
($SysLocale.StartsWith("tr") -and $LangName -like "*Turk*") -or `
|
($SysLocale.StartsWith("tr") -and $LangName -like "*Turk*") -or `
|
||||||
($SysLocale.StartsWith("uk") -and $LangName -like "*Ukrain*") -or `
|
($SysLocale.StartsWith("uk") -and $LangName -like "*Ukrain*") -or `
|
||||||
($SysLocale.StartsWith("vi") -and $LangName -like "*Vietnam*")) {
|
($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)
|
function Add-Entry([int]$pos, [string]$Name, [array]$Items, [string]$DisplayName)
|
||||||
@@ -500,7 +341,7 @@ function ConvertTo-ImageSource
|
|||||||
function Throw-Error([object]$Req, [string]$Alt)
|
function Throw-Error([object]$Req, [string]$Alt)
|
||||||
{
|
{
|
||||||
$Err = $(GetElementById -Request $Req -Id "errorModalMessage").innerText -replace "<[^>]+>" -replace "\s+", " "
|
$Err = $(GetElementById -Request $Req -Id "errorModalMessage").innerText -replace "<[^>]+>" -replace "\s+", " "
|
||||||
if (-not $Err) {
|
if (!$Err) {
|
||||||
$Err = $Alt
|
$Err = $Alt
|
||||||
} else {
|
} else {
|
||||||
$Err = [System.Text.Encoding]::UTF8.GetString([byte[]][char[]]$Err)
|
$Err = [System.Text.Encoding]::UTF8.GetString([byte[]][char[]]$Err)
|
||||||
@@ -511,7 +352,7 @@ function Throw-Error([object]$Req, [string]$Alt)
|
|||||||
# Translate a message string
|
# Translate a message string
|
||||||
function Get-Translation([string]$Text)
|
function Get-Translation([string]$Text)
|
||||||
{
|
{
|
||||||
if (-not $English -contains $Text) {
|
if (!($English -contains $Text)) {
|
||||||
Write-Host "Error: '$Text' is not a translatable string"
|
Write-Host "Error: '$Text' is not a translatable string"
|
||||||
return "(Untranslated)"
|
return "(Untranslated)"
|
||||||
}
|
}
|
||||||
@@ -549,7 +390,7 @@ function Error([string]$ErrorMessage)
|
|||||||
if (!$Cmd) {
|
if (!$Cmd) {
|
||||||
$XMLForm.Title = $(Get-Translation("Error")) + ": " + $ErrorMessage
|
$XMLForm.Title = $(Get-Translation("Error")) + ": " + $ErrorMessage
|
||||||
Refresh-Control($XMLForm)
|
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")
|
$UserInput = [System.Windows.MessageBox]::Show($XMLForm.Title, $(Get-Translation("Error")), "OK", "Error")
|
||||||
$script:ExitCode = $script:Stage--
|
$script:ExitCode = $script:Stage--
|
||||||
} else {
|
} else {
|
||||||
@@ -595,7 +436,7 @@ if ($Cmd) {
|
|||||||
$MaxStage = 4
|
$MaxStage = 4
|
||||||
$SessionId = [guid]::NewGuid()
|
$SessionId = [guid]::NewGuid()
|
||||||
$ExitCode = 100
|
$ExitCode = 100
|
||||||
$Locale = "en-US"
|
$Locale = $Locale
|
||||||
$RequestData = @{}
|
$RequestData = @{}
|
||||||
# This GUID applies to all visitors, regardless of their locale
|
# This GUID applies to all visitors, regardless of their locale
|
||||||
$RequestData["GetLangs"] = @("a8f8f489-4c7f-463a-9ca6-5cff94d8d041", "getskuinformationbyproductedition" )
|
$RequestData["GetLangs"] = @("a8f8f489-4c7f-463a-9ca6-5cff94d8d041", "getskuinformationbyproductedition" )
|
||||||
@@ -618,29 +459,24 @@ if ($Cmd) {
|
|||||||
# Localization
|
# Localization
|
||||||
$EnglishMessages = "en-US|Version|Release|Edition|Language|Architecture|Download|Continue|Back|Close|Cancel|Error|Please wait...|" +
|
$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.|" +
|
"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?"
|
"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."
|
||||||
[string[]]$English = $EnglishMessages.Split('|')
|
[string[]]$English = $EnglishMessages.Split('|')
|
||||||
[string[]]$Localized = $null
|
[string[]]$Localized = $null
|
||||||
if ($LocData -and (-not $LocData.StartsWith("en-US"))) {
|
if ($LocData -and !$LocData.StartsWith("en-US")) {
|
||||||
$Localized = $LocData.Split('|')
|
$Localized = $LocData.Split('|')
|
||||||
if ($Localized.Length -ne $English.Length) {
|
# Adjust the $Localized array if we have more or fewer strings than in $EnglishMessages
|
||||||
Write-Host "Error: Missing or extra translated messages provided ($($Localized.Length)/$($English.Length))"
|
if ($Localized.Length -lt $English.Length) {
|
||||||
exit 101
|
while ($Localized.Length -ne $English.Length) {
|
||||||
|
$Localized += $English[$Localized.Length]
|
||||||
|
}
|
||||||
|
} elseif ($Localized.Length -gt $English.Length) {
|
||||||
|
$Localized = $LocData.Split('|')[0..($English.Length - 1)]
|
||||||
}
|
}
|
||||||
$Locale = $Localized[0]
|
$Locale = $Localized[0]
|
||||||
}
|
}
|
||||||
$QueryLocale = $Locale
|
$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
|
# Convert a size in bytes to a human readable string
|
||||||
function Size-To-Human-Readable([uint64]$size)
|
function Size-To-Human-Readable([uint64]$size)
|
||||||
{
|
{
|
||||||
@@ -654,7 +490,8 @@ function Size-To-Human-Readable([uint64]$size)
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Check if the locale we want is available - Fall back to en-US otherwise
|
# Check if the locale we want is available - Fall back to en-US otherwise
|
||||||
function Check-Locale {
|
function Check-Locale
|
||||||
|
{
|
||||||
try {
|
try {
|
||||||
$url = "https://www.microsoft.com/" + $QueryLocale + "/software-download/"
|
$url = "https://www.microsoft.com/" + $QueryLocale + "/software-download/"
|
||||||
if ($Verbosity -ge 2) {
|
if ($Verbosity -ge 2) {
|
||||||
@@ -739,7 +576,8 @@ function Get-Windows-Languages([int]$SelectedVersion, [int]$SelectedEdition)
|
|||||||
if ($r -match "errorModalMessage") {
|
if ($r -match "errorModalMessage") {
|
||||||
Throw-Error -Req $r -Alt "Could not retrieve languages from server"
|
Throw-Error -Req $r -Alt "Could not retrieve languages from server"
|
||||||
}
|
}
|
||||||
$pattern = '(?s)<select id="product-languages">(.*)?</select>'
|
$r = $r -replace "`n" -replace "`r"
|
||||||
|
$pattern = '.*<select id="product-languages"[^>]*>(.*)</select>.*'
|
||||||
$html = [regex]::Match($r, $pattern).Groups[1].Value
|
$html = [regex]::Match($r, $pattern).Groups[1].Value
|
||||||
# Go through an XML conversion to keep all PowerShells happy...
|
# Go through an XML conversion to keep all PowerShells happy...
|
||||||
$html = $html.Replace("selected value", "value")
|
$html = $html.Replace("selected value", "value")
|
||||||
@@ -790,7 +628,7 @@ function Get-Windows-Download-Links([int]$SelectedVersion, [int]$SelectedRelease
|
|||||||
$xml = New-Object System.Xml.XmlDocument
|
$xml = New-Object System.Xml.XmlDocument
|
||||||
if ($Verbosity -ge 2) {
|
if ($Verbosity -ge 2) {
|
||||||
Write-Host Querying $url
|
Write-Host Querying $url
|
||||||
}
|
}
|
||||||
$xml.Load($url)
|
$xml.Load($url)
|
||||||
$sep = ""
|
$sep = ""
|
||||||
$archs = ""
|
$archs = ""
|
||||||
@@ -824,24 +662,14 @@ function Get-Windows-Download-Links([int]$SelectedVersion, [int]$SelectedRelease
|
|||||||
$Is64 = [Environment]::Is64BitOperatingSystem
|
$Is64 = [Environment]::Is64BitOperatingSystem
|
||||||
# Must add a referer for this request, else Microsoft's servers will deny it
|
# Must add a referer for this request, else Microsoft's servers will deny it
|
||||||
$ref = "https://www.microsoft.com/software-download/windows11"
|
$ref = "https://www.microsoft.com/software-download/windows11"
|
||||||
$wr = [System.Net.WebRequest]::Create($url)
|
$r = Invoke-WebRequest -Method Post -Headers @{ "Referer" = $ref } -UseBasicParsing -UserAgent $UserAgent -WebSession $Session $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") {
|
if ($r -match "errorModalMessage") {
|
||||||
$regex = New-Object Text.RegularExpressions.Regex '<p id="errorModalMessage">(.+?)<\/p>'
|
$Alt = [regex]::Match($r.Content, '<p id="errorModalMessage">(.+?)<\/p>').Groups[1].Value -replace "<[^>]+>" -replace "\s+", " " -replace "\?\?\?", "-"
|
||||||
$m = $regex.Match($r)
|
$Alt = [System.Text.Encoding]::UTF8.GetString([byte[]][char[]]$Alt)
|
||||||
# Make the typical error message returned by Microsoft's servers more presentable
|
if (!$Alt) {
|
||||||
$Alt = $m.Groups[1] -replace "<[^>]+>" -replace "\s+", " "
|
|
||||||
$Alt += " " + $SessionId + "."
|
|
||||||
if (-not $Alt) {
|
|
||||||
$Alt = "Could not retrieve architectures from server"
|
$Alt = "Could not retrieve architectures from server"
|
||||||
|
} elseif ($Alt -match "715-123130") {
|
||||||
|
$Alt += " " + $SessionId + "."
|
||||||
}
|
}
|
||||||
Throw-Error -Req $r -Alt $Alt
|
Throw-Error -Req $r -Alt $Alt
|
||||||
}
|
}
|
||||||
@@ -858,7 +686,7 @@ function Get-Windows-Download-Links([int]$SelectedVersion, [int]$SelectedRelease
|
|||||||
foreach ($var in $xml.inputs.input) {
|
foreach ($var in $xml.inputs.input) {
|
||||||
$json = $var.value | ConvertFrom-Json;
|
$json = $var.value | ConvertFrom-Json;
|
||||||
if ($json) {
|
if ($json) {
|
||||||
if (($Is64 -and $json.DownloadType -eq "x64") -or (-not $Is64 -and $json.DownloadType -eq "x86")) {
|
if (($Is64 -and $json.DownloadType -eq "x64") -or (!$Is64 -and $json.DownloadType -eq "x86")) {
|
||||||
$script:SelectedIndex = $i
|
$script:SelectedIndex = $i
|
||||||
}
|
}
|
||||||
$links += @(New-Object PsObject -Property @{ Type = $json.DownloadType; Link = $json.Uri })
|
$links += @(New-Object PsObject -Property @{ Type = $json.DownloadType; Link = $json.Uri })
|
||||||
@@ -880,7 +708,7 @@ function Get-Windows-Download-Links([int]$SelectedVersion, [int]$SelectedRelease
|
|||||||
function Process-Download-Link([string]$Url)
|
function Process-Download-Link([string]$Url)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
if ($PipeName -and -not $Check.IsChecked) {
|
if ($PipeName -and !$Check.IsChecked) {
|
||||||
Send-Message -PipeName $PipeName -Message $Url
|
Send-Message -PipeName $PipeName -Message $Url
|
||||||
} else {
|
} else {
|
||||||
if ($Cmd) {
|
if ($Cmd) {
|
||||||
@@ -891,10 +719,7 @@ function Process-Download-Link([string]$Url)
|
|||||||
$tmp_size = [uint64]::Parse($str_size)
|
$tmp_size = [uint64]::Parse($str_size)
|
||||||
$Size = Size-To-Human-Readable $tmp_size
|
$Size = Size-To-Human-Readable $tmp_size
|
||||||
Write-Host "Downloading '$File' ($Size)..."
|
Write-Host "Downloading '$File' ($Size)..."
|
||||||
if ($DisableProgress) {
|
Start-BitsTransfer -Source $Url -Destination $File
|
||||||
$ProgressPreference = 'SilentlyContinue'
|
|
||||||
}
|
|
||||||
Invoke-WebRequest -UseBasicParsing -Uri $Url -OutFile $File
|
|
||||||
} else {
|
} else {
|
||||||
Write-Host Download Link: $Url
|
Write-Host Download Link: $Url
|
||||||
Start-Process -FilePath $Url
|
Start-Process -FilePath $Url
|
||||||
@@ -915,6 +740,12 @@ if ($Cmd) {
|
|||||||
$winLanguageName = $null
|
$winLanguageName = $null
|
||||||
$winLink = $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
|
$i = 0
|
||||||
$Selected = ""
|
$Selected = ""
|
||||||
if ($Win -eq "List") {
|
if ($Win -eq "List") {
|
||||||
@@ -1073,7 +904,7 @@ $XMLForm.Title = $AppTitle
|
|||||||
if ($Icon) {
|
if ($Icon) {
|
||||||
$XMLForm.Icon = $Icon
|
$XMLForm.Icon = $Icon
|
||||||
} else {
|
} else {
|
||||||
$XMLForm.Icon = [Gui.Utils]::ExtractIcon("imageres.dll", -5205, $true) | ConvertTo-ImageSource
|
$XMLForm.Icon = [WinAPI.Utils]::ExtractIcon("imageres.dll", -5205, $true) | ConvertTo-ImageSource
|
||||||
}
|
}
|
||||||
if ($Locale.StartsWith("ar") -or $Locale.StartsWith("fa") -or $Locale.StartsWith("he")) {
|
if ($Locale.StartsWith("ar") -or $Locale.StartsWith("fa") -or $Locale.StartsWith("he")) {
|
||||||
$XMLForm.FlowDirection = "RightToLeft"
|
$XMLForm.FlowDirection = "RightToLeft"
|
||||||
@@ -1082,6 +913,12 @@ $WindowsVersionTitle.Text = Get-Translation("Version")
|
|||||||
$Continue.Content = Get-Translation("Continue")
|
$Continue.Content = Get-Translation("Continue")
|
||||||
$Back.Content = Get-Translation("Close")
|
$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
|
# Populate the Windows versions
|
||||||
$i = 0
|
$i = 0
|
||||||
$versions = @()
|
$versions = @()
|
||||||
@@ -1095,9 +932,9 @@ $WindowsVersion.DisplayMemberPath = "Version"
|
|||||||
# Button Action
|
# Button Action
|
||||||
$Continue.add_click({
|
$Continue.add_click({
|
||||||
$script:Stage++
|
$script:Stage++
|
||||||
$XMLGrid.Children[2 * $Stage + 1].IsEnabled = $False
|
$XMLGrid.Children[2 * $Stage + 1].IsEnabled = $false
|
||||||
$Continue.IsEnabled = $False
|
$Continue.IsEnabled = $false
|
||||||
$Back.IsEnabled = $False
|
$Back.IsEnabled = $false
|
||||||
Refresh-Control($Continue)
|
Refresh-Control($Continue)
|
||||||
Refresh-Control($Back)
|
Refresh-Control($Back)
|
||||||
|
|
||||||
@@ -1106,7 +943,7 @@ $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") {
|
if ($WindowsVersion.SelectedValue.Version.StartsWith("Windows")) {
|
||||||
Check-Locale
|
Check-Locale
|
||||||
}
|
}
|
||||||
$releases = Get-Windows-Releases $WindowsVersion.SelectedValue.Index
|
$releases = Get-Windows-Releases $WindowsVersion.SelectedValue.Index
|
||||||
@@ -1165,9 +1002,9 @@ $Continue.add_click({
|
|||||||
$XMLForm.Close()
|
$XMLForm.Close()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$Continue.IsEnabled = $True
|
$Continue.IsEnabled = $true
|
||||||
if ($Stage -ge 0) {
|
if ($Stage -ge 0) {
|
||||||
$Back.IsEnabled = $True
|
$Back.IsEnabled = $true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -1177,7 +1014,7 @@ $Back.add_click({
|
|||||||
} else {
|
} else {
|
||||||
$XMLGrid.Children.RemoveAt(2 * $Stage + 3)
|
$XMLGrid.Children.RemoveAt(2 * $Stage + 3)
|
||||||
$XMLGrid.Children.RemoveAt(2 * $Stage + 2)
|
$XMLGrid.Children.RemoveAt(2 * $Stage + 2)
|
||||||
$XMLGrid.Children[2 * $Stage + 1].IsEnabled = $True
|
$XMLGrid.Children[2 * $Stage + 1].IsEnabled = $true
|
||||||
$dh2 = $dh
|
$dh2 = $dh
|
||||||
if ($Stage -eq 4 -and $PipeName) {
|
if ($Stage -eq 4 -and $PipeName) {
|
||||||
$Check.Visibility = "Collapsed"
|
$Check.Visibility = "Collapsed"
|
||||||
@@ -1202,7 +1039,7 @@ $Back.add_click({
|
|||||||
})
|
})
|
||||||
|
|
||||||
# Display the dialog
|
# Display the dialog
|
||||||
$XMLForm.Add_Loaded( { $XMLForm.Activate() } )
|
$XMLForm.Add_Loaded({$XMLForm.Activate()})
|
||||||
$XMLForm.ShowDialog() | Out-Null
|
$XMLForm.ShowDialog() | Out-Null
|
||||||
|
|
||||||
# Clean up & exit
|
# Clean up & exit
|
||||||
@@ -1211,8 +1048,8 @@ exit $ExitCode
|
|||||||
# SIG # Begin signature block
|
# SIG # Begin signature block
|
||||||
# MIIkWQYJKoZIhvcNAQcCoIIkSjCCJEYCAQExDzANBglghkgBZQMEAgEFADB5Bgor
|
# MIIkWQYJKoZIhvcNAQcCoIIkSjCCJEYCAQExDzANBglghkgBZQMEAgEFADB5Bgor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FAlL4kWZlra4VM5rB2u1YkhleZYwFrQNUwjDwvQ6XTaviKbk5gOAI
|
# 2X+BpSTHgyWc/QmngljQLDf6hHsp6McAIgmV+YVeYWBTNorOOwKpJXHk/rHfwrRp
|
||||||
# z7bGgUFgJ4DVEbQWvy9/mMOpO50DsmwNdAFqj67N9wfZm6mPTiDldINEAN6K3QtN
|
# pseaa7KYpT64eO5DNQThO0JUPvmm4qqH6EPJz8ltLi2Okt4rifT/ZsUyG01yxHNs
|
||||||
# oGn9d/kLGKY3Uxxej0TLNb8wCpQPWMgryyHy32PjSvbaXnDy8FLUnw9u5NpgK7qV
|
# PnNeDAdOSFyt4jib6EzFQzeCJqDiV7li2WI7M388ac9eZsfIP/Oy173Vvwyo3FSr
|
||||||
# EJjcjiwTaR+PrDbskzu+knaphRGWkk8TmqKVLC3Zi/puTeDBafarunOPzXIV
|
# tiO/IbahCdMiNnioNoQ80W/RkgK+F7hPw3OIwWlkfhiqgU/yDEj4zLWIWLT6
|
||||||
# SIG # End signature block
|
# SIG # End signature block
|
||||||
|
19
README.md
19
README.md
@@ -56,12 +56,7 @@ the actual download links, for all the architectures available for that language
|
|||||||
Requirements
|
Requirements
|
||||||
------------
|
------------
|
||||||
|
|
||||||
PowerShell 3.0 or later is required. However the script should detect if you are using an older version and point you to
|
Windows 8 or later with PowerShell. Windows 7 is __not__ supported.
|
||||||
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
|
Commandline mode
|
||||||
----------------
|
----------------
|
||||||
@@ -69,25 +64,27 @@ Commandline mode
|
|||||||
Fido supports commandline mode whereas, whenever one of the following options is provided, a GUI is not instantiated
|
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.
|
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:
|
The options are:
|
||||||
- `Win`: Specify Windows version (e.g. _"Windows 10"_). Abbreviated version should work as well (e.g `-Win 10`) as long
|
- `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`.
|
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
|
- `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.
|
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`.
|
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
|
- `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`.
|
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
|
- `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
|
`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`.
|
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
|
- `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.
|
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,
|
- `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.
|
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:
|
Examples of a commandline download:
|
||||||
|
|
||||||
@@ -127,7 +124,7 @@ Additional Notes
|
|||||||
|
|
||||||
Because of its intended usage with Rufus, this script is not designed to cover every possible retail ISO downloads.
|
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
|
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 10 ISOs downloads.
|
to add support for LTSB/LTSC Windows ISOs downloads.
|
||||||
|
|
||||||
If you are interested in such downloads, then you are kindly invited to visit the relevant download pages from Microsoft
|
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.
|
such as [this one](https://www.microsoft.com/evalcenter/evaluate-windows-10-enterprise) for LTSC versions.
|
||||||
|
Reference in New Issue
Block a user