[windows] Replace WebClient with Invoke-WebRequest & Update EdgeDrive Thumbprint (#12390)

* [windows] Update EdgeDriver signature

* feat: Improve temp directory handling and update file download method

- Added check for \ existence before accessing it.
- If the directory does not exist, it is now created.
- Replaced System.Net.WebClient with Invoke-WebRequest for file downloads, improving compatibility and maintainability.

Co-authored-by: Subir0071 <[email protected]>

* [Windows] Remove check for TEMP_Dir

---------

Co-authored-by: Subir0071 <[email protected]>
This commit is contained in:
kishorekumar-anchala
2025-06-17 08:33:00 -06:00
committed by GitHub
co-authored by Subir0071
parent a0e2400abd
commit 42e65904de
2 changed files with 3 additions and 2 deletions
@@ -198,7 +198,7 @@ function Invoke-DownloadWithRetry {
for ($retries = 20; $retries -gt 0; $retries--) {
try {
$attemptStartTime = Get-Date
(New-Object System.Net.WebClient).DownloadFile($Url, $Path)
Invoke-WebRequest -Uri $Url -OutFile $Path -UseBasicParsing
$attemptSeconds = [math]::Round(($(Get-Date) - $attemptStartTime).TotalSeconds, 2)
Write-Host "Package downloaded in $attemptSeconds seconds"
break