Snippets

Takehiko NOZAKI Windows 7 patch download script (by Powershell)

Created by Takehiko NOZAKI last modified
$config = @{
"x86"="https://bitbucket.org/!api/2.0/snippets/tnozaki/Myk47/master/files/Windows%207(x86).txt";
"x64"="https://bitbucket.org/!api/2.0/snippets/tnozaki/p6oer/master/files/Windows%207(x64).txt";
}
[System.IO.Directory]::SetCurrentDirectory((Get-Location -PSProvider FileSystem).Path)
$webClient = New-Object System.Net.WebClient
$downloadList = [System.IO.Path]::GetTempFileName()
$url = $config[$Args[0]]
$webClient.DownloadFile($url, $downloadList)
Import-CSV -Encoding UTF8 -Delimiter '	' $downloadList | ForEach-Object {
  $url = $_.URL
  $webClient.DownloadFile($url, ([System.Uri]$url).segments[-1])
}
Remove-Item -Force $downloadList

Comments (0)

HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.