Jump to content
Fivewin Brasil

download direto no site


edutraini

Recommended Posts

Ola edutrine

tente esse comando via prompt, e usar o winexec

bitsadmin /transfer mydownloadjob /download /priority normal URL C:\Arquivo.ext

ex:

bitsadmin /transfer mydownloadjob /download /priority normal http://www.emtinformatica.com.br/site/Suporte_EMT.exe c:\teste.exe

ou

baixe o wget para windows(similar a linux), coloca na pasta de seu sistema

ex:

[]

Link to comment
Share on other sites

bitsadmin nao eh presente no winXP

eh lento no win10 (onde testei)

o exemplo abaixo eh super rapido, usando o Adodb.Stream junto com XMLHTTP (testado no win10)

fontes:

http://stackoverflow.com/questions/2973136/download-a-file-with-vbs

http://www.pctoledo.com.br/forum/viewtopic.php?f=4&t=16791

MsgRun( "Aguarde o download...", "espere", { || DowlFile() } )

Function DowlFile()
        oXMLHTTP := CREATEOBJECT( "Microsoft.XMLHTTP" )
        oADODBStream := CREATEOBJECT( "Adodb.Stream" )
        oXMLHTTP:Open( "GET", "http://www.emtinformatica.com.br/site/Suporte_EMT.exe", .f. )
        oXMLHTTP:Send()

        oADODBStream:Type := 1
	oADODBStream:Open()
	oADODBStream:Write( oXMLHTTP:ResponseBody )
	oADODBStream:SaveToFile( "c:\teste.exe", 2 )
Return nil

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...