Advertisement
Guest User

LoL Installer

a guest
Jun 23rd, 2016
1,043
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.60 KB | None | 0 0
  1. #include <InetConstants.au3>
  2.  
  3. ProgressOn("Download", "Downloading Runtimes...", "0%")
  4. $url1 = "http://download.microsoft.com/download/5/B/C/5BC5DBB3-652D-4DCE-B14A-475AB85EEF6E/vcredist_x86.exe"
  5. $url2 = "http://download.microsoft.com/download/3/2/2/3224B87F-CFA0-4E70-BDA3-3DE650EFEBA5/vcredist_x64.exe"
  6. $url3 = "http://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x86.exe"
  7. $url4 = "http://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x64.exe"
  8. $url5 = "http://download.microsoft.com/download/8/4/A/84A35BF1-DAFE-4AE8-82AF-AD2AE20B6B14/directx_Jun2010_redist.exe"
  9.  
  10. $dl1 = InetGet($url1, @TempDir & "\vcredist2010x86.exe", $INET_FORCERELOAD, $INET_DOWNLOADBACKGROUND)
  11. $size1 = InetGetSize($url1)
  12. Do
  13. Sleep(250)
  14. $bytes1 = Inetgetinfo($dl1, 0)
  15. $pct1 = Int($bytes1 / $size1 * 100)
  16. ProgressSet($pct1, $pct1 & "%")
  17. Until InetGetInfo($dl1, $INET_DOWNLOADCOMPLETE)
  18.  
  19. $dl2 = InetGet($url2, @TempDir & "\vcredist2010x64.exe", $INET_FORCERELOAD, $INET_DOWNLOADBACKGROUND)
  20. $size2 = InetGetSize($url2)
  21. Do
  22. Sleep(250)
  23. $bytes2 = Inetgetinfo($dl2, 0)
  24. $pct2 = Int($bytes2 / $size2 * 100)
  25. ProgressSet($pct2, $pct2 & "%")
  26. Until InetGetInfo($dl2, $INET_DOWNLOADCOMPLETE)
  27.  
  28. $dl3 = InetGet($url3, @TempDir & "\vcredist2012x86.exe", $INET_FORCERELOAD, $INET_DOWNLOADBACKGROUND)
  29. $size3 = InetGetSize($url3)
  30. Do
  31. Sleep(250)
  32. $bytes3 = Inetgetinfo($dl3, 0)
  33. $pct3 = Int($bytes3 / $size3 * 100)
  34. ProgressSet($pct3, $pct3 & "%")
  35. Until InetGetInfo($dl3, $INET_DOWNLOADCOMPLETE)
  36.  
  37. $dl4 = InetGet($url4, @TempDir & "\vcredist2012x64.exe", $INET_FORCERELOAD, $INET_DOWNLOADBACKGROUND)
  38. $size4 = InetGetSize($url4)
  39. Do
  40. Sleep(250)
  41. $bytes4 = Inetgetinfo($dl4, 0)
  42. $pct4 = Int($bytes4 / $size4 * 100)
  43. ProgressSet($pct4, $pct4 & "%")
  44. Until InetGetInfo($dl4, $INET_DOWNLOADCOMPLETE)
  45.  
  46. $dl5 = InetGet($url5, @TempDir & "\directx.exe", $INET_FORCERELOAD, $INET_DOWNLOADBACKGROUND)
  47. $size5 = InetGetSize($url5)
  48. Do
  49. Sleep(250)
  50. $bytes5 = Inetgetinfo($dl5, 0)
  51. $pct5 = Int($bytes5 / $size5 * 100)
  52. ProgressSet($pct5, $pct5 & "%")
  53. Until InetGetInfo($dl5, $INET_DOWNLOADCOMPLETE)
  54.  
  55. ProgressOff()
  56.  
  57. RunWait(@ComSpec & " /c " & '%temp%\vcredist2010x86.exe', "", @SW_HIDE)
  58. RunWait(@ComSpec & " /c " & '%temp%\vcredist2010x64.exe', "", @SW_HIDE)
  59. RunWait(@ComSpec & " /c " & '%temp%\vcredist2012x86.exe', "", @SW_HIDE)
  60. RunWait(@ComSpec & " /c " & '%temp%\vcredist2012x64.exe', "", @SW_HIDE)
  61. RunWait(@ComSpec & " /c " & '%temp%\directx.exe /Q /C /T:%temp%', "", @SW_HIDE) ; don't forget " " before "/c"
  62. RunWait(@ComSpec & " /c " & '%temp%\DXSETUP.exe /silent', "", @SW_HIDE)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement