SHARE
TWEET

Download Flash Windows 10/Windows 8

a guest Dec 25th, 2016 39 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. HTTPDownload "https://fpdownload.adobe.com/get/flashplayer/pdc/24.0.0.186/install_flash_player.exe", "C:\"
  2.  
  3. Sub HTTPDownload( myURL, myPath )
  4. ' This Sub downloads the FILE specified in myURL to the path specified in myPath.
  5. '
  6. ' myURL must always end with a file name
  7. ' myPath may be a directory or a file name; in either case the directory must exist
  8. '
  9. ' Written by Rob van der Woude
  10. ' http://www.robvanderwoude.com
  11. '
  12. ' Based on a script found on the Thai Visa forum
  13. ' http://www.thaivisa.com/forum/index.php?showtopic=21832
  14.  
  15.     ' Standard housekeeping
  16.     Dim i, objFile, objFSO, objHTTP, strFile, strMsg
  17.     Const ForReading = 1, ForWriting = 2, ForAppending = 8
  18.  
  19.     ' Create a File System Object
  20.     Set objFSO = CreateObject( "Scripting.FileSystemObject" )
  21.  
  22.     ' Check if the specified target file or folder exists,
  23.     ' and build the fully qualified path of the target file
  24.     If objFSO.FolderExists( myPath ) Then
  25.         strFile = objFSO.BuildPath( myPath, Mid( myURL, InStrRev( myURL, "/" ) + 1 ) )
  26.     ElseIf objFSO.FolderExists( Left( myPath, InStrRev( myPath, "\" ) - 1 ) ) Then
  27.         strFile = myPath
  28.     Else
  29.         WScript.Echo "ERROR: Target folder not found."
  30.         Exit Sub
  31.     End If
  32.  
  33.     ' Create or open the target file
  34.     Set objFile = objFSO.OpenTextFile( strFile, ForWriting, True )
  35.  
  36.     ' Create an HTTP object
  37.     Set objHTTP = CreateObject( "WinHttp.WinHttpRequest.5.1" )
  38.  
  39.     ' Download the specified URL
  40.     objHTTP.Open "GET", myURL, False
  41.     objHTTP.Send
  42.  
  43.     ' Write the downloaded byte stream to the target file
  44.     For i = 1 To LenB( objHTTP.ResponseBody )
  45.         objFile.Write Chr( AscB( MidB( objHTTP.ResponseBody, i, 1 ) ) )
  46.     Next
  47.  
  48.     ' Close the target file
  49.     objFile.Close( )
  50. End Sub
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top