Replacing Expand-Archive cmdlet

Replacing the Expand-Archive cmdlet with a more omnivorous .NET Framework
This commit is contained in:
amd64fox
2022-02-18 10:08:18 +03:00
parent 05e12e5ebd
commit e52b136f87
2 changed files with 10 additions and 6 deletions

View File

@@ -100,11 +100,13 @@ catch [System.Management.Automation.MethodInvocationException] {
}
}
Expand-Archive -Force -LiteralPath "$PWD\chrome_elf.zip" -DestinationPath $PWD
Add-Type -Assembly 'System.IO.Compression.FileSystem'
$zip = [System.IO.Compression.ZipFile]::Open("$PWD\chrome_elf.zip", 'read')
[System.IO.Compression.ZipFileExtensions]::ExtractToDirectory($zip, $PWD)
$zip.Dispose()
Remove-Item -LiteralPath "$PWD\chrome_elf.zip"
try {
$webClient.DownloadFile(
# Remote file URL

View File

@@ -100,11 +100,13 @@ catch [System.Management.Automation.MethodInvocationException] {
}
}
Expand-Archive -Force -LiteralPath "$PWD\chrome_elf.zip" -DestinationPath $PWD
Add-Type -Assembly 'System.IO.Compression.FileSystem'
$zip = [System.IO.Compression.ZipFile]::Open("$PWD\chrome_elf.zip", 'read')
[System.IO.Compression.ZipFileExtensions]::ExtractToDirectory($zip, $PWD)
$zip.Dispose()
Remove-Item -LiteralPath "$PWD\chrome_elf.zip"
try {
$webClient.DownloadFile(
# Remote file URL