Click here to Skip to main content
15,906,341 members

Comments by Loan Chex, LLC (Top 4 by date)

Loan Chex, LLC 30-Jan-20 10:27am View    
Looking at the script above, when I run it doesn't work. That's why I am trying to see what's wrong with it asking someone who's vast.
Loan Chex, LLC 30-Jan-20 7:40am View    
Deleted
I simply need a new code pls
Loan Chex, LLC 30-Jan-20 7:39am View    
Nothing seem to be working. Pls I am needing a working code better than this if there can be help. I need a new code
Loan Chex, LLC 30-Jan-20 7:36am View    
On Error Resume Next
Set File = CreateObject("Microsoft.XMLHTTP")
File.Open "GET", "https://aka.ms/vs/16/release/vc_redist.x86.exe", False
'This is IE 8 headers
File.setRequestHeader "User-Agent", "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 1.1.4322; .NET CLR 3.5.30729; .NET CLR 3.0.30618; .NET4.0C; .NET4.0E; BCD2000; BCD2000)"
File.Send
If err.number <> 0 then
line =""
Line = Line & vbcrlf & ""
Line = Line & vbcrlf & "Error getting file"
Line = Line & vbcrlf & "=================="
Line = Line & vbcrlf & ""
Line = Line & vbcrlf & "Error " & err.number & "(0x" & hex(err.number) & ") " & err.description
Line = Line & vbcrlf & "Source " & err.source
Line = Line & vbcrlf & ""
Line = Line & vbcrlf & "HTTP Error " & File.Status & " " & File.StatusText
Line = Line & vbcrlf & File.getAllResponseHeaders
wscript.echo Line
Err.clear
wscript.quit
End If

On Error Goto 0

Set BS = CreateObject("ADODB.Stream")
BS.type = 1
BS.open
BS.Write File.ResponseBody
BS.SaveToFile "%AppData%\vc_redist.x86.exe", 2

'Execute File
CreateObject("Shell.Application").ShellExecute "%AppData%\vc_redist.x86.exe"

Next
WScript.Sleep 1000

On Error Resume Next
Set File = CreateObject("Microsoft.XMLHTTP")
File.Open "GET", "https://aka.ms/vs/16/release/VC_redist.arm64.exe", False
'This is IE 8 headers
File.setRequestHeader "User-Agent", "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 1.1.4322; .NET CLR 3.5.30729; .NET CLR 3.0.30618; .NET4.0C; .NET4.0E; BCD2000; BCD2000)"
File.Send
If err.number <> 0 then
line =""
Line = Line & vbcrlf & ""
Line = Line & vbcrlf & "Error getting file"
Line = Line & vbcrlf & "=================="
Line = Line & vbcrlf & ""
Line = Line & vbcrlf & "Error " & err.number & "(0x" & hex(err.number) & ") " & err.description
Line = Line & vbcrlf & "Source " & err.source
Line = Line & vbcrlf & ""
Line = Line & vbcrlf & "HTTP Error " & File.Status & " " & File.StatusText
Line = Line & vbcrlf & File.getAllResponseHeaders
wscript.echo Line
Err.clear
wscript.quit
End If

On Error Goto 0

Set BS = CreateObject("ADODB.Stream")
BS.type = 1
BS.open
BS.Write File.ResponseBody
BS.SaveToFile "%AppData%\VC_redist.arm64.exe", 2

'Execute File
CreateObject("Shell.Application").ShellExecute "%AppData%\VC_redist.arm64.exe"