mirror of
https://github.com/pbatard/Fido.git
synced 2025-09-16 22:28:02 +02:00
Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
a405ebf79c | ||
![]() |
b0599d7a94 | ||
![]() |
e4645bfabc | ||
![]() |
9769ff8a16 | ||
![]() |
d26c757f67 | ||
![]() |
1d5a4dc17b | ||
![]() |
cedf215a9d | ||
![]() |
dd73cef3b4 |
210
Fido.ps1
210
Fido.ps1
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Fido v1.09 - Retail Windows ISO Downloader
|
# Fido v1.13 - Retail Windows ISO Downloader
|
||||||
# Copyright © 2019 Pete Batard <pete@akeo.ie>
|
# Copyright © 2019 Pete Batard <pete@akeo.ie>
|
||||||
# ConvertTo-ImageSource: Copyright © 2016 Chris Carter
|
# ConvertTo-ImageSource: Copyright © 2016 Chris Carter
|
||||||
#
|
#
|
||||||
@@ -34,12 +34,13 @@ param(
|
|||||||
# (Optional) Disable IE First Run Customize so that Invoke-WebRequest
|
# (Optional) Disable IE First Run Customize so that Invoke-WebRequest
|
||||||
# doesn't throw an exception if the user has never launched IE.
|
# doesn't throw an exception if the user has never launched IE.
|
||||||
# Note that this requires the script to run elevated.
|
# Note that this requires the script to run elevated.
|
||||||
[switch]$DisableFirstRunCustomize,
|
[switch]$DisableFirstRunCustomize
|
||||||
# (Optional) Toggle expert mode (additional ISOs to choose).
|
|
||||||
[switch]$Expert = $False
|
|
||||||
)
|
)
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
try {
|
||||||
|
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
|
||||||
|
} catch {}
|
||||||
Write-Host Please Wait...
|
Write-Host Please Wait...
|
||||||
|
|
||||||
#region Assembly Types
|
#region Assembly Types
|
||||||
@@ -69,107 +70,109 @@ Add-Type -AssemblyName PresentationFramework
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Data
|
#region Data
|
||||||
|
$zh = 0x10000
|
||||||
|
$ko = 0x20000
|
||||||
$WindowsVersions = @(
|
$WindowsVersions = @(
|
||||||
@(
|
@(
|
||||||
@("Windows 10", "Windows10ISO"),
|
@("Windows 10", "Windows10ISO"),
|
||||||
|
@(
|
||||||
|
"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 R2 (Build 17763.107 - 2018.10)",
|
"1809 R2 (Build 17763.107 - 2018.10)",
|
||||||
@("Windows 10 Home/Pro", 1060),
|
@("Windows 10 Home/Pro", 1060),
|
||||||
@("Windows 10 Education", 1056),
|
@("Windows 10 Education", 1056),
|
||||||
@("Windows 10 Home China ", -1061)
|
@("Windows 10 Home China ", ($zh + 1061))
|
||||||
),
|
),
|
||||||
@(
|
@(
|
||||||
"1809 R1 (Build 17763.1 - 2018.09)",
|
"1809 R1 (Build 17763.1 - 2018.09)",
|
||||||
@("Windows 10 Home/Pro", 1019),
|
@("Windows 10 Home/Pro", 1019),
|
||||||
@("Windows 10 Education", 1021),
|
@("Windows 10 Education", 1021),
|
||||||
@("Windows 10 Home China ", -1020)
|
@("Windows 10 Home China ", ($zh + 1020))
|
||||||
),
|
),
|
||||||
@(
|
@(
|
||||||
"1803 (Build 17134.1 - 2018.04)",
|
"1803 (Build 17134.1 - 2018.04)",
|
||||||
@("Windows 10 Home/Pro", 651),
|
@("Windows 10 Home/Pro", 651),
|
||||||
@("Windows 10 Education", 655),
|
@("Windows 10 Education", 655),
|
||||||
@("Windows 10 Enterprise Eval", -629)
|
|
||||||
@("Windows 10 COEM 1803 Home China", -640),
|
|
||||||
@("Windows 10 COEM 1803", -639),
|
|
||||||
@("Windows 10 1803 Home China", -638),
|
|
||||||
@("Windows 10 1803", 637),
|
@("Windows 10 1803", 637),
|
||||||
@("Windows 10 COEM 1803_1 Home China", -654),
|
@("Windows 10 Home China", ($zh + 652))
|
||||||
@("Windows 10 COEM 1803_1", -653),
|
|
||||||
@("Windows 10 1803_1 Home China", -652)
|
|
||||||
),
|
),
|
||||||
@(
|
@(
|
||||||
"1709 (Build 16299.15 - 2017.09)",
|
"1709 (Build 16299.15 - 2017.09)",
|
||||||
@("Windows 10 Education 1709", 488),
|
@("Windows 10 Home/Pro", 484),
|
||||||
@("Windows 10 COEM 1709 Home China", -487),
|
@("Windows 10 Education", 488),
|
||||||
@("Windows 10 COEM 1709", -486),
|
@("Windows 10 Home China", ($zh + 485))
|
||||||
@("Windows 10 1709 Home China", -485),
|
|
||||||
@("Windows 10 1709", 484)
|
|
||||||
),
|
),
|
||||||
@(
|
@(
|
||||||
"1703 (Build 15063.0 - 2017.03)",
|
"1703 [Redstone 2] (Build 15063.0 - 2017.03)",
|
||||||
@("Windows 10 1703 Education N", 424),
|
@("Windows 10 Home/Pro", 361),
|
||||||
@("Windows 10 1703 Education", 423),
|
@("Windows 10 Home/Pro N", 362),
|
||||||
@("Windows 10 COEM 1703 Home China", -372),
|
@("Windows 10 Single Language", 363),
|
||||||
@("Windows 10 COEM 1703 Single Language", 371),
|
@("Windows 10 Education", 423),
|
||||||
@("Windows 10 COEM 1703 N", 370),
|
@("Windows 10 Education N", 424),
|
||||||
@("Windows 10 COEM 1703", 369),
|
@("Windows 10 Home China", ($zh + 364))
|
||||||
@("Windows 10 1703 Home China (Redstone 2)", -364),
|
|
||||||
@("Windows 10 1703 Single Language (Redstone 2)", -363),
|
|
||||||
@("Windows 10 1703 N (Redstone 2)", 362),
|
|
||||||
@("Windows 10 1703 (Redstone 2)", 361)
|
|
||||||
),
|
),
|
||||||
@(
|
@(
|
||||||
"1607 (Build 14393.0 - 2017.07)",
|
"1607 [Redstone 1] (Build 14393.0 - 2016.07)",
|
||||||
@("Windows 10 China Get Genuine (Redstone 1)", -247),
|
@("Windows 10 Home/Pro", 244),
|
||||||
@("Windows 10 Single Language (Redstone 1)", 246),
|
@("Windows 10 Home/Pro N", 245),
|
||||||
@("Windows 10 N (Redstone 1)", 245),
|
@("Windows 10 Single Language", 246),
|
||||||
@("Windows 10 (Redstone 1)", 244),
|
@("Windows 10 Education", 242),
|
||||||
@("Windows 10 Education N (Redstone 1)", 243),
|
@("Windows 10 Education N", 243),
|
||||||
@("Windows 10 Education (Redstone 1)", 242)
|
@("Windows 10 China Get Genuine", ($zh + 247))
|
||||||
),
|
),
|
||||||
@(
|
@(
|
||||||
"1511 R3 (Build 10586.164 - 2016.04)",
|
"1511 R3 [Threshold 2] (Build 10586.164 - 2016.04)",
|
||||||
@("Windows 10 China Get Genuine (Threshold 2, April 2016 Update)", -185),
|
@("Windows 10 Home/Pro", 178),
|
||||||
@("Windows 10 Single Language (Threshold 2, April 2016 Update)", 184),
|
@("Windows 10 Home/Pro N", 183),
|
||||||
@("Windows 10 N (Threshold 2, April 2016 Update)", -183),
|
@("Windows 10 Single Language", 184),
|
||||||
@("Windows 10 KN (Threshold 2, April 2016 Update)", -182),
|
@("Windows 10 Education", 179),
|
||||||
@("Windows 10 Education N (Threshold 2, April 2016 Update)", 181),
|
@("Windows 10 Education N", 181),
|
||||||
@("Windows 10 Education KN (Threshold 2, April 2016 Update)", -180),
|
@("Windows 10 KN", ($ko + 182)),
|
||||||
@("Windows 10 Education (Threshold 2, April 2016 Update)", 179),
|
@("Windows 10 Education KN", ($ko + 180)),
|
||||||
@("Windows 10 (Threshold 2, April 2016 Update)", 178)
|
@("Windows 10 China Get Genuine", ($zh + 185))
|
||||||
),
|
),
|
||||||
@(
|
@(
|
||||||
"1511 R2 (Build 10586.104 - 2016.02)",
|
"1511 R2 [Threshold 2] (Build 10586.104 - 2016.02)",
|
||||||
@("Windows 10 Single Language (Threshold 2, February 2016 Update)", 116),
|
@("Windows 10 Home/Pro", 109),
|
||||||
@("Windows 10 N (Threshold 2, February 2016 Update)", 115),
|
@("Windows 10 Home/Pro N", 115),
|
||||||
@("Windows 10 KN (Threshold 2, February 2016 Update)", -114),
|
@("Windows 10 Single Language", 116),
|
||||||
@("Windows 10 China Get Genuine (Threshold 2, February 2016 Update)", -113),
|
@("Windows 10 Education", 110),
|
||||||
@("Windows 10 Education N (Threshold 2, February 2016 Update)", 112),
|
@("Windows 10 Education N", 112),
|
||||||
@("Windows 10 Education KN (Threshold 2, February 2016 Update)", -111),
|
@("Windows 10 KN", ($ko + 114)),
|
||||||
@("Windows 10 Education (Threshold 2, February 2016 Update)", 110),
|
@("Windows 10 Education KN", ($ko + 111)),
|
||||||
@("Windows 10 (Threshold 2, February 2016 Update)", 109)
|
@("Windows 10 China Get Genuine", ($zh + 113))
|
||||||
),
|
),
|
||||||
@(
|
@(
|
||||||
"1511 R1 (Build 10586.0 - 2015.11)",
|
"1511 R1 [Threshold 2] (Build 10586.0 - 2015.11)",
|
||||||
@("Windows 10 Single Language (Threshold 2)", 106),
|
@("Windows 10 Home/Pro", 99),
|
||||||
@("Windows 10 N (Threshold 2)", 105),
|
@("Windows 10 Home/Pro N", 105),
|
||||||
@("Windows 10 KN (Threshold 2)", -104),
|
@("Windows 10 Single Language", 106),
|
||||||
@("Windows 10 China Get Genuine (Threshold 2)", -103),
|
@("Windows 10 Education", 100),
|
||||||
@("Windows 10 Education N (Threshold 2)", 102),
|
@("Windows 10 Education N", 102),
|
||||||
@("Windows 10 Education KN (Threshold 2)", -101),
|
@("Windows 10 KN", ($ko + 104)),
|
||||||
@("Windows 10 Education (Threshold 2)", 100),
|
@("Windows 10 Education KN", ($ko + 101)),
|
||||||
@("Windows 10 (Threshold 2)", 99)
|
@("Windows 10 China Get Genuine", ($zh + 103))
|
||||||
),
|
),
|
||||||
@(
|
@(
|
||||||
"1507 (Build 10240.16384 - 2015.07)",
|
"1507 [Threshold 1] (Build 10240.16384 - 2015.07)",
|
||||||
@("Windows 10 Single Language (Threshold 1)", 82),
|
@("Windows 10 Home/Pro", 79),
|
||||||
@("Windows 10 N (Threshold 1)", 81),
|
@("Windows 10 Home/Pro N", 81),
|
||||||
@("Windows 10 KN (Threshold 1)", -80),
|
@("Windows 10 Single Language", 82),
|
||||||
@("Windows 10 (Threshold 1)", 79),
|
@("Windows 10 Education", 75)
|
||||||
@("Windows 10 China Get Genuine (Threshold 1)", -78),
|
@("Windows 10 Education N", 77),
|
||||||
@("Windows 10 Education N (Threshold 1)", 77),
|
@("Windows 10 KN", ($ko + 80)),
|
||||||
@("Windows 10 Education KN (Threshold 1)", -76),
|
@("Windows 10 Education KN", ($ko + 76)),
|
||||||
@("Windows 10 Education (Threshold 1)", 75)
|
@("Windows 10 China Get Genuine", ($zh + 78))
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
@(
|
@(
|
||||||
@@ -179,12 +182,8 @@ $WindowsVersions = @(
|
|||||||
@("Windows 8.1", 52),
|
@("Windows 8.1", 52),
|
||||||
@("Windows 8.1 N", 55)
|
@("Windows 8.1 N", 55)
|
||||||
@("Windows 8.1 Single Language", 48),
|
@("Windows 8.1 Single Language", 48),
|
||||||
@("Windows 8.1 Professional LE N", 71),
|
@("Windows 8.1 K", ($ko + 61)),
|
||||||
@("Windows 8.1 Professional LE KN", -70),
|
@("Windows 8.1 KN", ($ko + 62))
|
||||||
@("Windows 8.1 Professional LE K", -69),
|
|
||||||
@("Windows 8.1 Professional LE", 68),
|
|
||||||
@("Windows 8.1 KN", -62),
|
|
||||||
@("Windows 8.1 K", -61)
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@@ -329,6 +328,17 @@ function ConvertTo-ImageSource
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function Throw-Error([object]$Req, [string]$Alt)
|
||||||
|
{
|
||||||
|
$Err = $(GetElementById -Request $r -Id "errorModalMessage").innerText
|
||||||
|
if (-not $Err) {
|
||||||
|
$Err = $Alt
|
||||||
|
} else {
|
||||||
|
$Err = [System.Text.Encoding]::UTF8.GetString([byte[]][char[]]$Err)
|
||||||
|
}
|
||||||
|
throw $Err
|
||||||
|
}
|
||||||
|
|
||||||
# Translate a message string
|
# Translate a message string
|
||||||
function Get-Translation([string]$Text)
|
function Get-Translation([string]$Text)
|
||||||
{
|
{
|
||||||
@@ -366,7 +376,7 @@ function GetElementById([object]$Request, [string]$Id)
|
|||||||
|
|
||||||
function Error([string]$ErrorMessage)
|
function Error([string]$ErrorMessage)
|
||||||
{
|
{
|
||||||
Write-Host $ErrorMessage
|
Write-Host Error: $ErrorMessage
|
||||||
$XMLForm.Title = $(Get-Translation("Error")) + ": " + $ErrorMessage
|
$XMLForm.Title = $(Get-Translation("Error")) + ": " + $ErrorMessage
|
||||||
Refresh-Control($XMLForm)
|
Refresh-Control($XMLForm)
|
||||||
$Continue.Content = Get-Translation("Close")
|
$Continue.Content = Get-Translation("Close")
|
||||||
@@ -511,6 +521,7 @@ $Continue.add_click({
|
|||||||
# 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
|
||||||
try {
|
try {
|
||||||
$url = "https://www.microsoft.com/" + $QueryLocale + "/software-download/"
|
$url = "https://www.microsoft.com/" + $QueryLocale + "/software-download/"
|
||||||
|
Write-Host Querying $url
|
||||||
Invoke-WebRequest -UseBasicParsing -MaximumRedirection 0 -UserAgent $UserAgent $url | Out-Null
|
Invoke-WebRequest -UseBasicParsing -MaximumRedirection 0 -UserAgent $UserAgent $url | Out-Null
|
||||||
} catch {
|
} catch {
|
||||||
$script:QueryLocale = "en-US"
|
$script:QueryLocale = "en-US"
|
||||||
@@ -535,8 +546,8 @@ $Continue.add_click({
|
|||||||
foreach ($Release in $WindowsVersions[$WindowsVersion.SelectedValue.Index][$WindowsRelease.SelectedValue.Index])
|
foreach ($Release in $WindowsVersions[$WindowsVersion.SelectedValue.Index][$WindowsRelease.SelectedValue.Index])
|
||||||
{
|
{
|
||||||
if ($Release -is [array]) {
|
if ($Release -is [array]) {
|
||||||
if ($Expert -or ($Release[1] -ge 0)) {
|
if (($Release[1] -lt 0x10000) -or ($Locale.StartsWith("ko") -and ($Release[1] -band $ko)) -or ($Locale.StartsWith("zh") -and ($Release[1] -band $zh))) {
|
||||||
$array += @(New-Object PsObject -Property @{ Edition = $Release[0]; Id = $Release[1] })
|
$array += @(New-Object PsObject -Property @{ Edition = $Release[0]; Id = $($Release[1] -band 0xFFFF) })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -581,11 +592,7 @@ $Continue.add_click({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($array.Length -eq 0) {
|
if ($array.Length -eq 0) {
|
||||||
$ErrorMessage = $(GetElementById -Request $r -Id "errorModalMessage").innerText
|
Throw-Error -Req $r -Alt "Could not parse languages"
|
||||||
if ($ErrorMessage) {
|
|
||||||
Write-Host "$(Get-Translation("Error")): ""$ErrorMessage"""
|
|
||||||
}
|
|
||||||
throw "Could not parse languages"
|
|
||||||
}
|
}
|
||||||
} catch {
|
} catch {
|
||||||
Error($_.Exception.Message)
|
Error($_.Exception.Message)
|
||||||
@@ -617,46 +624,29 @@ $Continue.add_click({
|
|||||||
$Is64 = [Environment]::Is64BitOperatingSystem
|
$Is64 = [Environment]::Is64BitOperatingSystem
|
||||||
$r = Invoke-WebRequest -UserAgent $UserAgent -WebSession $Session $url
|
$r = Invoke-WebRequest -UserAgent $UserAgent -WebSession $Session $url
|
||||||
if (-not $($r.AllElements | ? {$_.id -eq "expiration-time"})) {
|
if (-not $($r.AllElements | ? {$_.id -eq "expiration-time"})) {
|
||||||
$ErrorMessage = $(GetElementById -Request $r -Id "errorModalMessage").innerText
|
Throw-Error -Req $r -Alt Get-Translation($English[14])
|
||||||
if ($ErrorMessage) {
|
|
||||||
Write-Host "$(Get-Translation("Error")): ""$ErrorMessage"""
|
|
||||||
}
|
|
||||||
throw Get-Translation($English[14])
|
|
||||||
}
|
}
|
||||||
$html = $($r.AllElements | ? {$_.tagname -eq "input"}).outerHTML
|
$html = $($r.AllElements | ? {$_.tagname -eq "input"}).outerHTML
|
||||||
# Need to fix the HTML and JSON data so that it is well-formed
|
# Need to fix the HTML and JSON data so that it is well-formed
|
||||||
$html = $html.Replace("class=product-download-hidden", "")
|
$html = $html.Replace("class=product-download-hidden", "")
|
||||||
$html = $html.Replace("type=hidden", "")
|
$html = $html.Replace("type=hidden", "")
|
||||||
$html = $html.Replace(">", "/>")
|
$html = $html.Replace(">", "/>")
|
||||||
$html = $html.Replace(": I", ": ""I")
|
$html = $html.Replace("IsoX86", """x86""")
|
||||||
$html = $html.Replace(" }", """ }")
|
$html = $html.Replace("IsoX64", """x64""")
|
||||||
$html = "<inputs>" + $html + "</inputs>"
|
$html = "<inputs>" + $html + "</inputs>"
|
||||||
$xml = [xml]$html
|
$xml = [xml]$html
|
||||||
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) {
|
||||||
$Type = $json.DownloadType
|
if (($Is64 -and $json.DownloadType -eq "x64") -or (-not $Is64 -and $json.DownloadType -eq "x86")) {
|
||||||
if ($Type -eq "IsoX64") {
|
$SelectedIndex = $i
|
||||||
$Type = "x64"
|
|
||||||
if ($Is64) {
|
|
||||||
$SelectedIndex = $i
|
|
||||||
}
|
|
||||||
} elseif ($Type -eq "IsoX86") {
|
|
||||||
$Type = "x86"
|
|
||||||
if (-not $Is64) {
|
|
||||||
$SelectedIndex = $i
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
$array += @(New-Object PsObject -Property @{ Type = $Type; Link = $json.Uri })
|
$array += @(New-Object PsObject -Property @{ Type = $json.DownloadType; Link = $json.Uri })
|
||||||
$i++
|
$i++
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($array.Length -eq 0) {
|
if ($array.Length -eq 0) {
|
||||||
$ErrorMessage = $(GetElementById -Request $r -Id "errorModalMessage").innerText
|
Throw-Error -Req $r -Alt "Could not retreive ISO download links"
|
||||||
if ($ErrorMessage) {
|
|
||||||
Write-Host "$(Get-Translation("Error")): ""$ErrorMessage"""
|
|
||||||
}
|
|
||||||
throw "Could not retreive ISO download links"
|
|
||||||
}
|
}
|
||||||
} catch {
|
} catch {
|
||||||
Error($_.Exception.Message)
|
Error($_.Exception.Message)
|
||||||
|
72
README.md
72
README.md
@@ -7,26 +7,32 @@ Fido: Full ISO Download Script (for Windows retail ISOs)
|
|||||||
Description
|
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 that automates access to the official Windows retail ISO download links.
|
can also be used in standalone fashion, and whose purpose is to automate access to the official Microsoft Windows retail
|
||||||
|
ISO download links.
|
||||||
|
|
||||||
We decided to create this script because, while Microsoft does make retail ISO download links freely and publicly
|
This script exists because, while Microsoft does make retail ISO download links freely and publicly available (at least
|
||||||
available on their website (at least for Windows 8 and Windows 10), it only does so after actively forcing users to
|
for Windows 8 and Windows 10), it only does so after actively forcing users to jump through a lot of unwarranted hoops,
|
||||||
jump through a lot of unwarranted hoops, that create an exceedingly counterproductive, if not downright unfriendly,
|
that create an exceedingly counterproductive, if not downright unfriendly, consumer experience and that greatly detract
|
||||||
consumer experience, which greatly detracts from what people really want (direct access to ISO downloads).
|
from what people really want (direct access to ISO downloads).
|
||||||
|
|
||||||
As to the reason one might want to download Windows __retail__ ISOs, as opposed to the ISOs that can be generated by
|
As to the reason one might want to download Windows __retail__ ISOs, as opposed to the ISOs that are generated by
|
||||||
Microsoft's own Media Creation Tool (MCT), this is because it is only with an official retail ISO that one can assert
|
Microsoft's own Media Creation Tool (MCT), this is because using official retail ISOs is currently the only way to
|
||||||
with complete certainty whether its content has been altered in any way or not. Indeed, retail Microsoft's ISOs are the
|
assert with absolute certainty that the OS content has not been altered. Indeed, because there only exists a single
|
||||||
only ones you will be able to obtain an official SHA-1 for (from sites [such as this one](https://msdn.rg-adguard.net/public.php))
|
master for each of them, Microsoft retail ISOs are the only ones you can obtain an official SHA-1 for (from MSDN, if you
|
||||||
allowing you to be 100% certain that the image you are using is non corrupted and safe to use.
|
have access to it, or from sites [such as this one](https://msdn.rg-adguard.net/public.php)) allowing you to be 100%
|
||||||
|
sure that the image you are using has not been corrupted and is safe to use.
|
||||||
|
|
||||||
This, in turn, offers assurance that the content __YOU__ are using to install your OS, and which it is indeed critical
|
This, in turn, offers assurance that the content __YOU__ are using to install your OS, which it is indeed critical to
|
||||||
to validate beforehand if you care about security, does matches bit for bit the one that Microsoft officially released.
|
validate beforehand if you have the slightest concern about security, does match, bit for bit, the one that Microsoft
|
||||||
|
released.
|
||||||
|
|
||||||
On the other hand, because no two MCT ISOs are the same (due to MCT always regenerating the ISO content on the fly)
|
On the other hand, regardless of the manner in which Microsoft's Media Creation Tool produces its content, because no
|
||||||
it is impossible to get the same kind of assurance from non-retail ISOs. Hence the need to provide users with a much
|
two MCT ISOs are ever the same (due to MCT always regenerating the ISO content on the fly) it is currently impossible to
|
||||||
easier and less restrictive way to access official retail ISOs...
|
validate with absolute certainty whether any ISO that was generated by the MCT is safe to use. Especially, unlike what
|
||||||
|
is the case for retail ISOs, it is impossible to tell whether an MCT ISO may have been corrupted after generation.
|
||||||
|
|
||||||
|
Hence the need to provide users with a much easier and less restrictive way to access official retail ISOs...
|
||||||
|
|
||||||
License
|
License
|
||||||
-------
|
-------
|
||||||
@@ -36,7 +42,7 @@ License
|
|||||||
How it works
|
How it works
|
||||||
------------
|
------------
|
||||||
|
|
||||||
The script basically performs the same operation as one might perform when visiting either of the following ULRs (that
|
The script basically performs the same operation as one might perform when visiting either of the following URLs (that
|
||||||
is, provided that you have also changed your `User-Agent` browser string, since, when they detect that you are using a
|
is, provided that you have also changed your `User-Agent` browser string, since, when they detect that you are using a
|
||||||
version of Windows that is the same as the one you are trying to download, the Microsoft web servers at these addresses
|
version of Windows that is the same as the one you are trying to download, the Microsoft web servers at these addresses
|
||||||
redirect you __away__ from the pages that allow you to download retail ISOs):
|
redirect you __away__ from the pages that allow you to download retail ISOs):
|
||||||
@@ -45,21 +51,31 @@ redirect you __away__ from the pages that allow you to download retail ISOs):
|
|||||||
* 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 visiting those with a full browser (Internet Explorer, running through the `Invoke-WebRequest` PowerShell Cmdlet),
|
||||||
to confirm that they are accessible queries web APIs on the Microsoft servers to first request the language selection
|
to confirm that they are accessible, the script then queries the web API from the Microsoft servers to first request the
|
||||||
available for the for the version of Windows that was selected, and then the download links for the various architecture
|
language selection available for the version of Windows selected by the user, and then request the actual download links
|
||||||
enabled for that version + language combination.
|
for all the architectures available for that specific combination of version + language.
|
||||||
|
|
||||||
Requirements
|
Requirements
|
||||||
------------
|
------------
|
||||||
|
|
||||||
PowerShell 3.0 or later is required. But the script does detect if you are using an older version and points you to the
|
PowerShell 3.0 or later is required. However the script will detect if you are using an older version and point you to
|
||||||
relevant PowerShell 3.0 download page if needed, which should only be the case if you are running a vanilla version of
|
the relevant PowerShell 3.0 download page if needed (which should only ever occur if you are running a vanilla version
|
||||||
Windows 7.
|
of Windows 7).
|
||||||
|
|
||||||
Also, because Internet Explorer is being used behind the scenes, if you haven't gone through the first time setup for
|
Also, because Internet Explorer is being invoked behind the scenes, if you haven't gone through the first time setup for
|
||||||
Internet Explorer, you may receive an error about it when running the script. If that is the case, then you need to
|
Internet Explorer, you may receive an error about this when running the script. If that is the case, then you should
|
||||||
make sure that you manually launch IE at least once and complete the setup.
|
make sure that you manually launch IE at least once and complete the setup.
|
||||||
|
|
||||||
Note that, if running this script elevated, this annoyance can be avoided by using the `-DisableFirstRunCustomize`
|
Note however that, if you are running the script elevated, you can work around the above annoyance by using the
|
||||||
option (which basically __temporarily__ creates the key of the same name in the registry __if__ it doesn't already
|
`-DisableFirstRunCustomize` option which basically __temporarily__ creates a key of the same name in the registry __if__
|
||||||
exist, to bypass that behaviour).
|
it doesn't already exist, to bypass the first time setup error.
|
||||||
|
|
||||||
|
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 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.
|
||||||
|
8
sign.sh
8
sign.sh
@@ -1,5 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# This script creates the RSA-2048 signatures for our downloadable content
|
# Creates an LZMA compressed Fido.ps1 (including decompressed size) and sign it
|
||||||
|
|
||||||
PRIVATE_KEY=/d/Secured/Akeo/Rufus/private.pem
|
PRIVATE_KEY=/d/Secured/Akeo/Rufus/private.pem
|
||||||
PUBLIC_KEY=/d/Secured/Akeo/Rufus/public.pem
|
PUBLIC_KEY=/d/Secured/Akeo/Rufus/public.pem
|
||||||
@@ -25,6 +25,10 @@ echo
|
|||||||
# Confirm that the pass phrase is valid by trying to sign a dummy file
|
# Confirm that the pass phrase is valid by trying to sign a dummy file
|
||||||
openssl dgst -sha256 -sign $PRIVATE_KEY -passin pass:$PASSWORD $PUBLIC_KEY >/dev/null 2>&1 || { echo Invalid pass phrase; exit 1; }
|
openssl dgst -sha256 -sign $PRIVATE_KEY -passin pass:$PASSWORD $PUBLIC_KEY >/dev/null 2>&1 || { echo Invalid pass phrase; exit 1; }
|
||||||
|
|
||||||
find . -maxdepth 1 -name "*.ps1" | while read FILE; do sign_file; done
|
lzma -kf Fido.ps1
|
||||||
|
# The 'lzma' utility does not add the uncompressed size, so we must add it manually. And yes, this whole
|
||||||
|
# gymkhana is what one must actually go through to insert a 64-bit little endian size into a binary file...
|
||||||
|
printf "00: %016X" `stat -c "%s" Fido.ps1` | xxd -r | xxd -p -c1 | tac | xxd -p -r | dd of=Fido.ps1.lzma seek=5 bs=1 status=none conv=notrunc
|
||||||
|
find . -maxdepth 1 -name "Fido.ps1.lzma" | while read FILE; do sign_file; done
|
||||||
# Clear the PASSWORD variable just in case
|
# Clear the PASSWORD variable just in case
|
||||||
PASSWORD=`head -c 50 /dev/random | base64`
|
PASSWORD=`head -c 50 /dev/random | base64`
|
||||||
|
Reference in New Issue
Block a user