hello

with my script i hava an error, dit you ave an idea ?
sSource = "http://go.microsoft.com/fwlink/?LinkId=18922"
sDest = "mssecure.txt"

set oHTTP = CreateObject("Microsoft.XMLHTTP")
set oStream = createobject("adodb.stream")
oStream.type = 1

oHTTP.open "GET", sSource, False
oHTTP.send

msgbox oHTTP.getResponseHeader

oStream.open
oStream.write oHTTP.responseBody
oStream.savetofile sDest

Re: pb download file with xmlhttp by Bill

Bill
Tue Jan 20 07:31:36 CST 2004

What is the error?

--=20

Bill James
Microsoft MVP - Shell/User

Windows VBScript Utilities =BB www.billsway.com/vbspage/
Windows Tweaks & Tips =BB www.billsway.com/notes_public/

"Lo=EFc Deschamps" <ldeschamps@coltfrance.com> wrote in message =
news:edNPUi13DHA.488@TK2MSFTNGP12.phx.gbl...
> hello
>=20
> with my script i hava an error, dit you ave an idea ?
> sSource =3D "http://go.microsoft.com/fwlink/?LinkId=3D18922"
> sDest =3D "mssecure.txt"
>=20
> set oHTTP =3D CreateObject("Microsoft.XMLHTTP")
> set oStream =3D createobject("adodb.stream")
> oStream.type =3D 1
>=20
> oHTTP.open "GET", sSource, False
> oHTTP.send
>=20
> msgbox oHTTP.getResponseHeader
>=20
> oStream.open
> oStream.write oHTTP.responseBody
> oStream.savetofile sDest
>=20
>

Re: pb download file with xmlhttp by Loïc

Loïc
Tue Jan 20 07:58:49 CST 2004

the file mssecure.cab are not save on my hard disk

i thing that the url "http://go.microsoft.com/fwlink/?LinkId=18922" do a
redirection

if you enter this url in your browser a file is downloaded

"Bill James" <wgjames@mvps.org> a écrit dans le message de
news:uOX$4m13DHA.2888@tk2msftngp13.phx.gbl...
What is the error?

--

Bill James
Microsoft MVP - Shell/User

Windows VBScript Utilities » www.billsway.com/vbspage/
Windows Tweaks & Tips » www.billsway.com/notes_public/

"Loïc Deschamps" <ldeschamps@coltfrance.com> wrote in message
news:edNPUi13DHA.488@TK2MSFTNGP12.phx.gbl...
> hello
>
> with my script i hava an error, dit you ave an idea ?
> sSource = "http://go.microsoft.com/fwlink/?LinkId=18922"
> sDest = "mssecure.txt"
>
> set oHTTP = CreateObject("Microsoft.XMLHTTP")
> set oStream = createobject("adodb.stream")
> oStream.type = 1
>
> oHTTP.open "GET", sSource, False
> oHTTP.send
>
> msgbox oHTTP.getResponseHeader
>
> oStream.open
> oStream.write oHTTP.responseBody
> oStream.savetofile sDest
>
>



Re: pb download file with xmlhttp by Bill

Bill
Tue Jan 20 08:22:12 CST 2004

Your message seemed to indicate you were getting an error. If so then =
the exact error message is important for figuring out what is wrong. =
The msgbox in your command is going to fail because of missing parameter =
for getResponseHeader, but I can't tell why you want a msgbox, it =
doesn't make any difference for downloading the file. I ran the script =
and it worked fine, however the download is not a text file so I'm not =
sure what you are trying to do.

--=20

Bill James
Microsoft MVP - Shell/User

Windows VBScript Utilities =BB www.billsway.com/vbspage/
Windows Tweaks & Tips =BB www.billsway.com/notes_public/

"Lo=EFc Deschamps" <ldeschamps@coltfrance.com> wrote in message =
news:el9FK213DHA.2648@tk2msftngp13.phx.gbl...
> the file mssecure.cab are not save on my hard disk
>=20
> i thing that the url "http://go.microsoft.com/fwlink/?LinkId=3D18922" =
do a
> redirection
>=20
> if you enter this url in your browser a file is downloaded
>=20
> "Bill James" <wgjames@mvps.org> a =E9crit dans le message de
> news:uOX$4m13DHA.2888@tk2msftngp13.phx.gbl...
> What is the error?
>=20
> --=20
>=20
> Bill James
> Microsoft MVP - Shell/User
>=20
> Windows VBScript Utilities =BB www.billsway.com/vbspage/
> Windows Tweaks & Tips =BB www.billsway.com/notes_public/
>=20
> "Lo=EFc Deschamps" <ldeschamps@coltfrance.com> wrote in message
> news:edNPUi13DHA.488@TK2MSFTNGP12.phx.gbl...
> > hello
> >
> > with my script i hava an error, dit you ave an idea ?
> > sSource =3D "http://go.microsoft.com/fwlink/?LinkId=3D18922"
> > sDest =3D "mssecure.txt"
> >
> > set oHTTP =3D CreateObject("Microsoft.XMLHTTP")
> > set oStream =3D createobject("adodb.stream")
> > oStream.type =3D 1
> >
> > oHTTP.open "GET", sSource, False
> > oHTTP.send
> >
> > msgbox oHTTP.getResponseHeader
> >
> > oStream.open
> > oStream.write oHTTP.responseBody
> > oStream.savetofile sDest
> >
> >
>=20
>

Re: pb download file with xmlhttp by Loïc

Loïc
Tue Jan 20 08:42:18 CST 2004

ok
i modify the script but it 's not work

sSource = "http://go.microsoft.com/fwlink/?LinkId=18922"
sDest = "mssecure.cab"

set oHTTP = CreateObject("Microsoft.XMLHTTP")
set oStream = createobject("adodb.stream")
oStream.type = 1

oHTTP.open "GET", sSource, False
oHTTP.send

oStream.open
oStream.write oHTTP.responseBody
oStream.savetofile sDest

"Bill James" <wgjames@mvps.org> a écrit dans le message de
news:u%23hGLD23DHA.2136@TK2MSFTNGP12.phx.gbl...
Your message seemed to indicate you were getting an error. If so then the
exact error message is important for figuring out what is wrong. The msgbox
in your command is going to fail because of missing parameter for
getResponseHeader, but I can't tell why you want a msgbox, it doesn't make
any difference for downloading the file. I ran the script and it worked
fine, however the download is not a text file so I'm not sure what you are
trying to do.

--

Bill James
Microsoft MVP - Shell/User

Windows VBScript Utilities » www.billsway.com/vbspage/
Windows Tweaks & Tips » www.billsway.com/notes_public/

"Loïc Deschamps" <ldeschamps@coltfrance.com> wrote in message
news:el9FK213DHA.2648@tk2msftngp13.phx.gbl...
> the file mssecure.cab are not save on my hard disk
>
> i thing that the url "http://go.microsoft.com/fwlink/?LinkId=18922" do a
> redirection
>
> if you enter this url in your browser a file is downloaded
>
> "Bill James" <wgjames@mvps.org> a écrit dans le message de
> news:uOX$4m13DHA.2888@tk2msftngp13.phx.gbl...
> What is the error?
>
> --
>
> Bill James
> Microsoft MVP - Shell/User
>
> Windows VBScript Utilities » www.billsway.com/vbspage/
> Windows Tweaks & Tips » www.billsway.com/notes_public/
>
> "Loïc Deschamps" <ldeschamps@coltfrance.com> wrote in message
> news:edNPUi13DHA.488@TK2MSFTNGP12.phx.gbl...
> > hello
> >
> > with my script i hava an error, dit you ave an idea ?
> > sSource = "http://go.microsoft.com/fwlink/?LinkId=18922"
> > sDest = "mssecure.txt"
> >
> > set oHTTP = CreateObject("Microsoft.XMLHTTP")
> > set oStream = createobject("adodb.stream")
> > oStream.type = 1
> >
> > oHTTP.open "GET", sSource, False
> > oHTTP.send
> >
> > msgbox oHTTP.getResponseHeader
> >
> > oStream.open
> > oStream.write oHTTP.responseBody
> > oStream.savetofile sDest
> >
> >
>
>



Re: pb download file with xmlhttp by Bill

Bill
Tue Jan 20 08:50:07 CST 2004

As I said before, it works here, so unless you can provide more details =
about what is happening for you, then I don't know what to suggest.

--=20

Bill James
Microsoft MVP - Shell/User

Windows VBScript Utilities =BB www.billsway.com/vbspage/
Windows Tweaks & Tips =BB www.billsway.com/notes_public/

"Lo=EFc Deschamps" <ldeschamps@coltfrance.com> wrote in message =
news:%23akwdO23DHA.1392@TK2MSFTNGP11.phx.gbl...
> ok
> i modify the script but it 's not work
>=20
> sSource =3D "http://go.microsoft.com/fwlink/?LinkId=3D18922"
> sDest =3D "mssecure.cab"
>=20
> set oHTTP =3D CreateObject("Microsoft.XMLHTTP")
> set oStream =3D createobject("adodb.stream")
> oStream.type =3D 1
>=20
> oHTTP.open "GET", sSource, False
> oHTTP.send
>=20
> oStream.open
> oStream.write oHTTP.responseBody
> oStream.savetofile sDest
>=20
> "Bill James" <wgjames@mvps.org> a =E9crit dans le message de
> news:u%23hGLD23DHA.2136@TK2MSFTNGP12.phx.gbl...
> Your message seemed to indicate you were getting an error. If so then =
the
> exact error message is important for figuring out what is wrong. The =
msgbox
> in your command is going to fail because of missing parameter for
> getResponseHeader, but I can't tell why you want a msgbox, it doesn't =
make
> any difference for downloading the file. I ran the script and it =
worked
> fine, however the download is not a text file so I'm not sure what you =
are
> trying to do.
>=20
> --=20
>=20
> Bill James
> Microsoft MVP - Shell/User
>=20
> Windows VBScript Utilities =BB www.billsway.com/vbspage/
> Windows Tweaks & Tips =BB www.billsway.com/notes_public/
>=20
> "Lo=EFc Deschamps" <ldeschamps@coltfrance.com> wrote in message
> news:el9FK213DHA.2648@tk2msftngp13.phx.gbl...
> > the file mssecure.cab are not save on my hard disk
> >
> > i thing that the url =
"http://go.microsoft.com/fwlink/?LinkId=3D18922" do a
> > redirection
> >
> > if you enter this url in your browser a file is downloaded
> >
> > "Bill James" <wgjames@mvps.org> a =E9crit dans le message de
> > news:uOX$4m13DHA.2888@tk2msftngp13.phx.gbl...
> > What is the error?
> >
> > --=20
> >
> > Bill James
> > Microsoft MVP - Shell/User
> >
> > Windows VBScript Utilities =BB www.billsway.com/vbspage/
> > Windows Tweaks & Tips =BB www.billsway.com/notes_public/
> >
> > "Lo=EFc Deschamps" <ldeschamps@coltfrance.com> wrote in message
> > news:edNPUi13DHA.488@TK2MSFTNGP12.phx.gbl...
> > > hello
> > >
> > > with my script i hava an error, dit you ave an idea ?
> > > sSource =3D "http://go.microsoft.com/fwlink/?LinkId=3D18922"
> > > sDest =3D "mssecure.txt"
> > >
> > > set oHTTP =3D CreateObject("Microsoft.XMLHTTP")
> > > set oStream =3D createobject("adodb.stream")
> > > oStream.type =3D 1
> > >
> > > oHTTP.open "GET", sSource, False
> > > oHTTP.send
> > >
> > > msgbox oHTTP.getResponseHeader
> > >
> > > oStream.open
> > > oStream.write oHTTP.responseBody
> > > oStream.savetofile sDest
> > >
> > >
> >
> >
>=20
>

Re: pb download file with xmlhttp by Loïc

Loïc
Tue Jan 20 08:53:24 CST 2004

nothing happen on my workstation, no error message
i test this script with XP

"Bill James" <wgjames@mvps.org> a écrit dans le message de
news:%23GPSxS23DHA.1816@TK2MSFTNGP12.phx.gbl...
As I said before, it works here, so unless you can provide more details
about what is happening for you, then I don't know what to suggest.

--

Bill James
Microsoft MVP - Shell/User

Windows VBScript Utilities » www.billsway.com/vbspage/
Windows Tweaks & Tips » www.billsway.com/notes_public/

"Loïc Deschamps" <ldeschamps@coltfrance.com> wrote in message
news:%23akwdO23DHA.1392@TK2MSFTNGP11.phx.gbl...
> ok
> i modify the script but it 's not work
>
> sSource = "http://go.microsoft.com/fwlink/?LinkId=18922"
> sDest = "mssecure.cab"
>
> set oHTTP = CreateObject("Microsoft.XMLHTTP")
> set oStream = createobject("adodb.stream")
> oStream.type = 1
>
> oHTTP.open "GET", sSource, False
> oHTTP.send
>
> oStream.open
> oStream.write oHTTP.responseBody
> oStream.savetofile sDest
>
> "Bill James" <wgjames@mvps.org> a écrit dans le message de
> news:u%23hGLD23DHA.2136@TK2MSFTNGP12.phx.gbl...
> Your message seemed to indicate you were getting an error. If so then the
> exact error message is important for figuring out what is wrong. The
msgbox
> in your command is going to fail because of missing parameter for
> getResponseHeader, but I can't tell why you want a msgbox, it doesn't make
> any difference for downloading the file. I ran the script and it worked
> fine, however the download is not a text file so I'm not sure what you are
> trying to do.
>
> --
>
> Bill James
> Microsoft MVP - Shell/User
>
> Windows VBScript Utilities » www.billsway.com/vbspage/
> Windows Tweaks & Tips » www.billsway.com/notes_public/
>
> "Loïc Deschamps" <ldeschamps@coltfrance.com> wrote in message
> news:el9FK213DHA.2648@tk2msftngp13.phx.gbl...
> > the file mssecure.cab are not save on my hard disk
> >
> > i thing that the url "http://go.microsoft.com/fwlink/?LinkId=18922" do
a
> > redirection
> >
> > if you enter this url in your browser a file is downloaded
> >
> > "Bill James" <wgjames@mvps.org> a écrit dans le message de
> > news:uOX$4m13DHA.2888@tk2msftngp13.phx.gbl...
> > What is the error?
> >
> > --
> >
> > Bill James
> > Microsoft MVP - Shell/User
> >
> > Windows VBScript Utilities » www.billsway.com/vbspage/
> > Windows Tweaks & Tips » www.billsway.com/notes_public/
> >
> > "Loïc Deschamps" <ldeschamps@coltfrance.com> wrote in message
> > news:edNPUi13DHA.488@TK2MSFTNGP12.phx.gbl...
> > > hello
> > >
> > > with my script i hava an error, dit you ave an idea ?
> > > sSource = "http://go.microsoft.com/fwlink/?LinkId=18922"
> > > sDest = "mssecure.txt"
> > >
> > > set oHTTP = CreateObject("Microsoft.XMLHTTP")
> > > set oStream = createobject("adodb.stream")
> > > oStream.type = 1
> > >
> > > oHTTP.open "GET", sSource, False
> > > oHTTP.send
> > >
> > > msgbox oHTTP.getResponseHeader
> > >
> > > oStream.open
> > > oStream.write oHTTP.responseBody
> > > oStream.savetofile sDest
> > >
> > >
> >
> >
>
>



Re: pb download file with xmlhttp by Loïc

Loïc
Tue Jan 20 09:20:47 CST 2004

ok it's works with the line
set oHTTP = CreateObject("MSXML2.ServerXMLHTTP")


"Loïc Deschamps" <ldeschamps@coltfrance.com> a écrit dans le message de
news:e1kfqU23DHA.3944@tk2msftngp13.phx.gbl...
> nothing happen on my workstation, no error message
> i test this script with XP
>
> "Bill James" <wgjames@mvps.org> a écrit dans le message de
> news:%23GPSxS23DHA.1816@TK2MSFTNGP12.phx.gbl...
> As I said before, it works here, so unless you can provide more details
> about what is happening for you, then I don't know what to suggest.
>
> --
>
> Bill James
> Microsoft MVP - Shell/User
>
> Windows VBScript Utilities » www.billsway.com/vbspage/
> Windows Tweaks & Tips » www.billsway.com/notes_public/
>
> "Loïc Deschamps" <ldeschamps@coltfrance.com> wrote in message
> news:%23akwdO23DHA.1392@TK2MSFTNGP11.phx.gbl...
> > ok
> > i modify the script but it 's not work
> >
> > sSource = "http://go.microsoft.com/fwlink/?LinkId=18922"
> > sDest = "mssecure.cab"
> >
> > set oHTTP = CreateObject("Microsoft.XMLHTTP")
> > set oStream = createobject("adodb.stream")
> > oStream.type = 1
> >
> > oHTTP.open "GET", sSource, False
> > oHTTP.send
> >
> > oStream.open
> > oStream.write oHTTP.responseBody
> > oStream.savetofile sDest
> >
> > "Bill James" <wgjames@mvps.org> a écrit dans le message de
> > news:u%23hGLD23DHA.2136@TK2MSFTNGP12.phx.gbl...
> > Your message seemed to indicate you were getting an error. If so then
the
> > exact error message is important for figuring out what is wrong. The
> msgbox
> > in your command is going to fail because of missing parameter for
> > getResponseHeader, but I can't tell why you want a msgbox, it doesn't
make
> > any difference for downloading the file. I ran the script and it worked
> > fine, however the download is not a text file so I'm not sure what you
are
> > trying to do.
> >
> > --
> >
> > Bill James
> > Microsoft MVP - Shell/User
> >
> > Windows VBScript Utilities » www.billsway.com/vbspage/
> > Windows Tweaks & Tips » www.billsway.com/notes_public/
> >
> > "Loïc Deschamps" <ldeschamps@coltfrance.com> wrote in message
> > news:el9FK213DHA.2648@tk2msftngp13.phx.gbl...
> > > the file mssecure.cab are not save on my hard disk
> > >
> > > i thing that the url "http://go.microsoft.com/fwlink/?LinkId=18922" do
> a
> > > redirection
> > >
> > > if you enter this url in your browser a file is downloaded
> > >
> > > "Bill James" <wgjames@mvps.org> a écrit dans le message de
> > > news:uOX$4m13DHA.2888@tk2msftngp13.phx.gbl...
> > > What is the error?
> > >
> > > --
> > >
> > > Bill James
> > > Microsoft MVP - Shell/User
> > >
> > > Windows VBScript Utilities » www.billsway.com/vbspage/
> > > Windows Tweaks & Tips » www.billsway.com/notes_public/
> > >
> > > "Loïc Deschamps" <ldeschamps@coltfrance.com> wrote in message
> > > news:edNPUi13DHA.488@TK2MSFTNGP12.phx.gbl...
> > > > hello
> > > >
> > > > with my script i hava an error, dit you ave an idea ?
> > > > sSource = "http://go.microsoft.com/fwlink/?LinkId=18922"
> > > > sDest = "mssecure.txt"
> > > >
> > > > set oHTTP = CreateObject("Microsoft.XMLHTTP")
> > > > set oStream = createobject("adodb.stream")
> > > > oStream.type = 1
> > > >
> > > > oHTTP.open "GET", sSource, False
> > > > oHTTP.send
> > > >
> > > > msgbox oHTTP.getResponseHeader
> > > >
> > > > oStream.open
> > > > oStream.write oHTTP.responseBody
> > > > oStream.savetofile sDest
> > > >
> > > >
> > >
> > >
> >
> >
>
>



Re: pb download file with xmlhttp by Michael

Michael
Tue Jan 20 19:32:15 CST 2004

Bill James wrote:
> As I said before, it works here, so unless you can provide more
> details about what is happening for you, then I don't know what to
> suggest.


It works only if you allow cross domain data source access.

In IE security settings for the Internet security zone, set (Miscellaneous)
'Access data sources across domains' to Enable.

If the script is executed interactively, then a setting of Prompt will also
work *if* you reply Yes. Otherwise, if you reply No, it hangs in the send
method, the same as if the setting was Disable.


--
Michael Harris
Microsoft.MVP.Scripting

Windows 2000 Scripting Guide
Microsoft® Windows®2000 Scripting Guide
http://www.microsoft.com/technet/scriptcenter/scrguide/sagsas_overview.asp

TechNet Script Center Sample Scripts
http://www.microsoft.com/downloads/release.asp?ReleaseID=38942

WSH 5.6 documentation download
http://www.microsoft.com/downloads/details.aspx?FamilyId=01592C48-207D-4BE1-8A76-1C4099D7BBB9&displaylang=en