Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <InetConstants.au3>
- ProgressOn("Download", "Downloading Runtimes...", "0%")
- $url1 = "http://download.microsoft.com/download/5/B/C/5BC5DBB3-652D-4DCE-B14A-475AB85EEF6E/vcredist_x86.exe"
- $url2 = "http://download.microsoft.com/download/3/2/2/3224B87F-CFA0-4E70-BDA3-3DE650EFEBA5/vcredist_x64.exe"
- $url3 = "http://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x86.exe"
- $url4 = "http://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x64.exe"
- $url5 = "http://download.microsoft.com/download/8/4/A/84A35BF1-DAFE-4AE8-82AF-AD2AE20B6B14/directx_Jun2010_redist.exe"
- $dl1 = InetGet($url1, @TempDir & "\vcredist2010x86.exe", $INET_FORCERELOAD, $INET_DOWNLOADBACKGROUND)
- $size1 = InetGetSize($url1)
- Do
- Sleep(250)
- $bytes1 = Inetgetinfo($dl1, 0)
- $pct1 = Int($bytes1 / $size1 * 100)
- ProgressSet($pct1, $pct1 & "%")
- Until InetGetInfo($dl1, $INET_DOWNLOADCOMPLETE)
- $dl2 = InetGet($url2, @TempDir & "\vcredist2010x64.exe", $INET_FORCERELOAD, $INET_DOWNLOADBACKGROUND)
- $size2 = InetGetSize($url2)
- Do
- Sleep(250)
- $bytes2 = Inetgetinfo($dl2, 0)
- $pct2 = Int($bytes2 / $size2 * 100)
- ProgressSet($pct2, $pct2 & "%")
- Until InetGetInfo($dl2, $INET_DOWNLOADCOMPLETE)
- $dl3 = InetGet($url3, @TempDir & "\vcredist2012x86.exe", $INET_FORCERELOAD, $INET_DOWNLOADBACKGROUND)
- $size3 = InetGetSize($url3)
- Do
- Sleep(250)
- $bytes3 = Inetgetinfo($dl3, 0)
- $pct3 = Int($bytes3 / $size3 * 100)
- ProgressSet($pct3, $pct3 & "%")
- Until InetGetInfo($dl3, $INET_DOWNLOADCOMPLETE)
- $dl4 = InetGet($url4, @TempDir & "\vcredist2012x64.exe", $INET_FORCERELOAD, $INET_DOWNLOADBACKGROUND)
- $size4 = InetGetSize($url4)
- Do
- Sleep(250)
- $bytes4 = Inetgetinfo($dl4, 0)
- $pct4 = Int($bytes4 / $size4 * 100)
- ProgressSet($pct4, $pct4 & "%")
- Until InetGetInfo($dl4, $INET_DOWNLOADCOMPLETE)
- $dl5 = InetGet($url5, @TempDir & "\directx.exe", $INET_FORCERELOAD, $INET_DOWNLOADBACKGROUND)
- $size5 = InetGetSize($url5)
- Do
- Sleep(250)
- $bytes5 = Inetgetinfo($dl5, 0)
- $pct5 = Int($bytes5 / $size5 * 100)
- ProgressSet($pct5, $pct5 & "%")
- Until InetGetInfo($dl5, $INET_DOWNLOADCOMPLETE)
- ProgressOff()
- RunWait(@ComSpec & " /c " & '%temp%\vcredist2010x86.exe', "", @SW_HIDE)
- RunWait(@ComSpec & " /c " & '%temp%\vcredist2010x64.exe', "", @SW_HIDE)
- RunWait(@ComSpec & " /c " & '%temp%\vcredist2012x86.exe', "", @SW_HIDE)
- RunWait(@ComSpec & " /c " & '%temp%\vcredist2012x64.exe', "", @SW_HIDE)
- RunWait(@ComSpec & " /c " & '%temp%\directx.exe /Q /C /T:%temp%', "", @SW_HIDE) ; don't forget " " before "/c"
- RunWait(@ComSpec & " /c " & '%temp%\DXSETUP.exe /silent', "", @SW_HIDE)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement