Compare commits

...

8 Commits
v1.38 ... v1.43

Author SHA1 Message Date
Pete Batard
10acbf9f84 Improve error handling
* Simplify regex and fix unconverted characters.
* Also use Start-BitsTransfer for cmdline downloads (Closes #56).
* Also remove -DisableProgress now that we use Start-BitsTransfer.
2023-02-06 01:22:02 +00:00
Pete Batard
4b24ae5795 Fix Windows 7 detection
* Of course, Windows 7's PowerShell is too stupid to actually compare Version objects.
2023-01-27 15:12:02 +00:00
Pete Batard
2ca0f62f53 Fix language regexp and force TLS for Windows 8.x
* Non En locales may still return '<select id="product-languages">' instead of
  '<select id="product-languages" ...>' so make sure we account for that case.
* Addresses pbatard/rufus#2148
* Also force TLS for Windows 8.x to address pbatard/rufus#2133
2023-01-27 13:39:13 +00:00
Pete Batard
448cfa72cf Remove Windows 7 support
* "I'm sorry for your loss. Move on."
2023-01-27 13:28:28 +00:00
Pete Batard
9552df66d5 Update language option regexp to match latest Microsoft HTML fragment
* Addresses pbatard/rufus#2146
* Also update .gitattributes to clean up release archives
2023-01-25 20:04:14 +00:00
Pete Batard
4bafb688da Remove unneeded files
* .whitesource is unneeded because we don't use external dependencies.
* VS project files are unneeded when we just edit the .ps1 in a text editor.
2023-01-11 20:22:13 +00:00
Pete Batard
ad79094c30 Improve error handling and reporting when querying vlscppe.microsoft.com
* Also use a better default icon and add a preemptive localized message for
  future countermeasures from Microsoft.
2023-01-09 17:32:59 +00:00
Pete Batard
8cf4a279ff Work around Microsoft's new ISO download countermeasures
* The Microsoft servers now use session Id whitelisting, so add querying
  of https://vlscppe.microsoft.com/tags with the session Id.
* Closes #52.
* Also harmonize/improve -replace calls
* Also make sure we use POST for the getskuinformationbyproductedition
  query (in case Microsoft add some more countermeasures).
* Also drop 'cmd /c' invocation in sign.sh since the cygwin people can't
  seem to get their act together there...
2023-01-08 22:10:01 +00:00
8 changed files with 89 additions and 142 deletions

View File

@@ -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 = space
trim_trailing_whitespace = true

3
.gitattributes vendored
View File

@@ -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

View File

@@ -1,8 +0,0 @@
{
"checkRunSettings": {
"vulnerableCheckRunConclusionLevel": "failure"
},
"issueSettings": {
"minSeverityLevel": "LOW"
}
}

152
Fido.ps1
View File

@@ -1,5 +1,5 @@
# #
# Fido v1.38 - Feature ISO Downloader, for retail Windows images and UEFI Shell # Fido v1.43 - 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
@@ -24,7 +24,7 @@
#region Parameters #region Parameters
param( param(
# (Optional) The title to display on the application window. # (Optional) The title to display on the application window.
[string]$AppTitle = "Fido - Retail Windows ISO Downloader", [string]$AppTitle = "Fido - Feature ISO Downloader",
# (Optional) '|' separated UI localization strings. # (Optional) '|' separated UI localization strings.
[string]$LocData, [string]$LocData,
# (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.
@@ -45,9 +45,7 @@ param(
# (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
@@ -60,6 +58,14 @@ if ($Win -or $Rel -or $Ed -or $Lang -or $Arch -or $GetUrl) {
$Cmd = $True $Cmd = $True
} }
# Craft a decimal numeric version of Windows, since Windows 7's PowerShell is too stupid to compare it to a Version object
$winver = [System.Environment]::OSVersion.Version.Major * 1.0 + [System.Environment]::OSVersion.Version.Minor * 0.1
# 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 = @" $code = @"
[DllImport("shell32.dll", CharSet = CharSet.Auto, SetLastError = true, BestFitMapping = false, ThrowOnUnmappableChar = true)] [DllImport("shell32.dll", CharSet = CharSet.Auto, SetLastError = true, BestFitMapping = false, ThrowOnUnmappableChar = true)]
@@ -499,7 +505,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 '<[^>]+>','' $Err = $(GetElementById -Request $Req -Id "errorModalMessage").innerText -replace "<[^>]+>" -replace "\s+", " "
if (-not $Err) { if (-not $Err) {
$Err = $Alt $Err = $Alt
} else { } else {
@@ -602,7 +608,7 @@ $RequestData["GetLangs"] = @("a8f8f489-4c7f-463a-9ca6-5cff94d8d041", "getskuinfo
# This GUID applies to visitors of the en-US download page. Other locales may get a different GUID. # This GUID applies to visitors of the en-US download page. Other locales may get a different GUID.
$RequestData["GetLinks"] = @("6e2a1789-ef16-4f27-a296-74ef7ef5d96b", "GetProductDownloadLinksBySku" ) $RequestData["GetLinks"] = @("6e2a1789-ef16-4f27-a296-74ef7ef5d96b", "GetProductDownloadLinksBySku" )
# Create a semi-random Linux User-Agent string # Create a semi-random Linux User-Agent string
$FirefoxVersion = Get-Random -Minimum 50 -Maximum 90 $FirefoxVersion = Get-Random -Minimum 90 -Maximum 110
$FirefoxDate = Get-RandomDate $FirefoxDate = Get-RandomDate
$UserAgent = "Mozilla/5.0 (X11; Linux i586; rv:$FirefoxVersion.0) Gecko/$FirefoxDate Firefox/$FirefoxVersion.0" $UserAgent = "Mozilla/5.0 (X11; Linux i586; rv:$FirefoxVersion.0) Gecko/$FirefoxDate Firefox/$FirefoxVersion.0"
$Verbosity = 2 $Verbosity = 2
@@ -617,30 +623,25 @@ 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|Temporarily banned by Microsoft for requesting too many downloads - Please try again later...|" + "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 for this version of Windows."
[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 (-not $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)
{ {
@@ -710,6 +711,17 @@ function Get-Windows-Languages([int]$SelectedVersion, [int]$SelectedEdition)
} elseif ($WindowsVersions[$SelectedVersion][0][1].StartsWith("UEFI_SHELL")) { } elseif ($WindowsVersions[$SelectedVersion][0][1].StartsWith("UEFI_SHELL")) {
$languages += @(New-Object PsObject -Property @{ DisplayLanguage = "English (US)"; Language = "en-us"; Id = 0 }) $languages += @(New-Object PsObject -Property @{ DisplayLanguage = "English (US)"; Language = "en-us"; Id = 0 })
} else { } else {
# Microsoft download protection now requires the sessionId to be whitelisted through vlscppe.microsoft.com/tags
$url = "https://vlscppe.microsoft.com/tags?org_id=y6jn8c31&session_id=" + $SessionId
if ($Verbosity -ge 2) {
Write-Host Querying $url
}
try {
Invoke-WebRequest -UseBasicParsing -MaximumRedirection 0 -UserAgent $UserAgent $url | Out-Null
} catch {
Error($_.Exception.Message)
return @()
}
$url = "https://www.microsoft.com/" + $QueryLocale + "/api/controls/contentinclude/html" $url = "https://www.microsoft.com/" + $QueryLocale + "/api/controls/contentinclude/html"
$url += "?pageId=" + $RequestData["GetLangs"][0] $url += "?pageId=" + $RequestData["GetLangs"][0]
$url += "&host=www.microsoft.com" $url += "&host=www.microsoft.com"
@@ -724,11 +736,12 @@ function Get-Windows-Languages([int]$SelectedVersion, [int]$SelectedEdition)
$script:SelectedIndex = 0 $script:SelectedIndex = 0
try { try {
$r = Invoke-WebRequest -UseBasicParsing -UserAgent $UserAgent -SessionVariable "Session" $url $r = Invoke-WebRequest -Method Post -UseBasicParsing -UserAgent $UserAgent -SessionVariable "Session" $url
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")
@@ -811,25 +824,15 @@ function Get-Windows-Download-Links([int]$SelectedVersion, [int]$SelectedRelease
try { try {
$Is64 = [Environment]::Is64BitOperatingSystem $Is64 = [Environment]::Is64BitOperatingSystem
# Must add a referer for POST requests, else Microsoft's servers will deny them # 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, '<p id="errorModalMessage">(.+?)<\/p>').Groups[1].Value -replace "<[^>]+>" -replace "\s+", " " -replace "\?\?\?", "-"
$m = $regex.Match($r)
# Make the typical error message returned by Microsoft's servers more presentable
$Alt = $m.Groups[1] -replace '<[^>]+>' -replace ' Microsoft Support Contact Us ',' "Microsoft Support Contact Us" ' -replace ' and$','.'
if (-not $Alt) { if (-not $Alt) {
$Alt = "Could not retrieve architectures from server" $Alt = "Could not retrieve architectures from server"
} else {
$Alt += " " + $SessionId + "."
} }
Throw-Error -Req $r -Alt $Alt Throw-Error -Req $r -Alt $Alt
} }
@@ -879,10 +882,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
@@ -903,6 +903,12 @@ if ($Cmd) {
$winLanguageName = $null $winLanguageName = $null
$winLink = $null $winLink = $null
# Windows 7 has become too much of a liability
if ($winver -le 6.1) {
Error(Get-Translation("This feature is not available for this version of Windows."))
exit 403
}
$i = 0 $i = 0
$Selected = "" $Selected = ""
if ($Win -eq "List") { if ($Win -eq "List") {
@@ -963,7 +969,7 @@ if ($Cmd) {
if (!$Ed -and $Verbosity -ge 1) { if (!$Ed -and $Verbosity -ge 1) {
Write-Host "No edition specified (-Ed). Defaulting to '$($edition.Edition)'." Write-Host "No edition specified (-Ed). Defaulting to '$($edition.Edition)'."
} }
$Selected += "," + $edition.Edition -replace "Windows [0-9\.]*", "" $Selected += "," + $edition.Edition -replace "Windows [0-9\.]*"
$winEditionId = $edition.Id $winEditionId = $edition.Id
break; break;
} }
@@ -1061,7 +1067,7 @@ $XMLForm.Title = $AppTitle
if ($Icon) { if ($Icon) {
$XMLForm.Icon = $Icon $XMLForm.Icon = $Icon
} else { } else {
$XMLForm.Icon = [Gui.Utils]::ExtractIcon("shell32.dll", -41, $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")) { if ($Locale.StartsWith("ar") -or $Locale.StartsWith("fa") -or $Locale.StartsWith("he")) {
$XMLForm.FlowDirection = "RightToLeft" $XMLForm.FlowDirection = "RightToLeft"
@@ -1070,6 +1076,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 has become too much of a liability
if ($winver -le 6.1) {
Error(Get-Translation("This feature is not available for this version of Windows."))
exit 403
}
# Populate the Windows versions # Populate the Windows versions
$i = 0 $i = 0
$versions = @() $versions = @()
@@ -1199,8 +1211,8 @@ exit $ExitCode
# SIG # Begin signature block # SIG # Begin signature block
# MIIkWAYJKoZIhvcNAQcCoIIkSTCCJEUCAQExDzANBglghkgBZQMEAgEFADB5Bgor # MIIkWAYJKoZIhvcNAQcCoIIkSTCCJEUCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCA8HBGUKpZF1hGq # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCAin+3j4moQLVFU
# 7vrEyB4Rxs5RjECuccksFkOHdV+pYqCCElkwggVvMIIEV6ADAgECAhBI/JO0YFWU # tqR8rGAmmgj13m89LOKayGbAncwfZqCCElkwggVvMIIEV6ADAgECAhBI/JO0YFWU
# jTanyYqJ1pQWMA0GCSqGSIb3DQEBDAUAMHsxC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/fXlJUtHMhrUc5l6YjLN+P1CeHYozr0A7ElD/ZVDjQol8yyPJ # BPkufnx3wPWvzQECIQ1cmfDDHh8TjPENpMpmosJz6WVtAOjlVlrgFfT/A/5J8fh5
# WGS+c8mRxq8iYpBnuqyxpYahzUhYPLl3JIpm4NAk379R3xzpFe02aZKwULDhPukw # vj7vdDHhkW+PozQyKJI2UROJrFyo1ZbD8fHIgBGalHT9PD+/BoN3yps6vLvgVUWX
# N0DNqmNUJj7YRxq56BbDN0Vw9HAAOWq02PXffqhUwS9vBUMBZDQjIxiBRdJdBGqn # +mMdH7g1gwcHvmLl2ocmPANNR7gfdw/8BUtLlnK5Jgta3DANEh/A7Wedo1Gt4ctN
# 1oaS25drZ1c+MmJL+Q3lpBYxKWzKs6DYX1M+p2bpxB9QU+x8FjHoFB0ogwwDKLGa # NVC2g3Vs1BhyF8EJj274wtQuSC/9Q9SoBQhrnBYD/pElwOkFCQB+VFAP0TOnyqvS
# z6G4Vq2oTrTkvc6qYYukUiOoxZX79IlkzrYtAkjLQY7nIZsF/oiP4rnAuew= # YO9QM5G3Xd31TRkW9i83G1SNMhKf0du/voqtplcIEMqXfYGdagtzY+qSf1c=
# SIG # End signature block # SIG # End signature block

View File

@@ -1,35 +0,0 @@
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>6CAFC0C6-A428-4d30-A9F9-700E829FEA51</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>Fido</RootNamespace>
<AssemblyName>Fido</AssemblyName>
<Name>Frida</Name>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup />
<ItemGroup>
<Compile Include="Fido.ps1" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Target Name="Build" />
<Import Project="$(MSBuildExtensionsPath)\PowerShell Tools for Visual Studio\PowerShellTools.targets" Condition="Exists('$(MSBuildExtensionsPath)\PowerShell Tools for Visual Studio\PowerShellTools.targets')" />
</Project>

View File

@@ -1,25 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28307.271
MinimumVisualStudioVersion = 10.0.40219.1
Project("{F5034706-568F-408A-B7B3-4D38C6DB8A32}") = "Fido", "Fido.pssproj", "{6CAFC0C6-A428-4D30-A9F9-700E829FEA51}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{6CAFC0C6-A428-4D30-A9F9-700E829FEA51}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6CAFC0C6-A428-4D30-A9F9-700E829FEA51}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6CAFC0C6-A428-4D30-A9F9-700E829FEA51}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6CAFC0C6-A428-4D30-A9F9-700E829FEA51}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {AD54CEAE-0992-4213-BEDB-8F1CF98A9F22}
EndGlobalSection
EndGlobal

View File

@@ -87,7 +87,6 @@ The options are:
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:

View File

@@ -21,7 +21,7 @@ sign_file() {
} }
# Update the Authenticode signature # Update the Authenticode signature
cmd.exe /c '"C:\Program Files (x86)\Windows Kits\10\bin\10.0.22000.0\x64\signtool" sign /v /sha1 3dbc3a2a0e9ce8803b422cfdbc60acd33164965d /fd SHA256 /tr http://sha256timestamp.ws.symantec.com/sha256/timestamp /td SHA256 Fido.ps1' MSYS2_ARG_CONV_EXCL='*' "C:\Program Files (x86)\Windows Kits\10\bin\10.0.22000.0\x64\signtool" sign /v /sha1 3dbc3a2a0e9ce8803b422cfdbc60acd33164965d /fd SHA256 /tr http://sha256timestamp.ws.symantec.com/sha256/timestamp /td SHA256 Fido.ps1
read -s -p "Enter pass phrase for `realpath $PRIVATE_KEY`: " PASSWORD read -s -p "Enter pass phrase for `realpath $PRIVATE_KEY`: " PASSWORD
echo 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