mirror of
https://github.com/rbalsleyMSFT/FFU.git
synced 2026-06-14 02:09:35 -06:00
Adjust pattern for URL scraping
This commit is contained in:
@@ -2321,7 +2321,7 @@ function Get-MSRTUrl {
|
|||||||
)
|
)
|
||||||
try {
|
try {
|
||||||
# Retrieve content of Windows Malicious Software Removal Tool page
|
# Retrieve content of Windows Malicious Software Removal Tool page
|
||||||
$pattern = '\"url\":\"(https://download\.microsoft\.com/download/[^"]+)\"'
|
$pattern = 'https:\/\/download\.microsoft\.com\/download\/[^\s]*\.exe'
|
||||||
$OriginalVerbosePreference = $VerbosePreference
|
$OriginalVerbosePreference = $VerbosePreference
|
||||||
$VerbosePreference = 'SilentlyContinue'
|
$VerbosePreference = 'SilentlyContinue'
|
||||||
if ($WindowsArch -eq "x64") {
|
if ($WindowsArch -eq "x64") {
|
||||||
@@ -2337,7 +2337,7 @@ function Get-MSRTUrl {
|
|||||||
WriteLog "Failed to retrieve Malicious Software Removal Tool URL. Pattern match failed"
|
WriteLog "Failed to retrieve Malicious Software Removal Tool URL. Pattern match failed"
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
$MSRTUrl = $MSRTMatch.Groups[1].Value
|
$MSRTUrl = $MSRTMatch.Value
|
||||||
return $MSRTUrl
|
return $MSRTUrl
|
||||||
}
|
}
|
||||||
catch {
|
catch {
|
||||||
|
|||||||
Reference in New Issue
Block a user