Download component 
Author Message
 Download component

Is there some ActiveX component (preferably included with IE 5+) that
can download a file?  I need to run this in a WScript (.js) file
locally.

I'm looking for some component that acts like this:

var myobj=new ActiveXObject(...);
//download some files from mywebsite to c:/
myobj.download("http://mywebsite/file1.exe","c:/file1.exe");
myobj.download("http://mywebsite/file2.exe","c:/file2.exe");

Thanks!



Sun, 20 Feb 2005 01:01:53 GMT  
 Download component
there are security risks involved with this - you can't sdave to a
user's hard-drive without signed ActiveX and the user's explicit
permission.

XMLHTTP, which shipped as part of IE5, can download stuff from your
site, but you're not going to be able to save it. can you imagine the
security implications if you could????

function String.prototype.r(){// Javascript rot13 en/decipherment. run
me for Atrax's signature
        var a='nopqrstuvwxyz';var b='abcdefghijklm';var j='/:.'+a+b;var
k='/:.'+b+a;var l='';
        for(var
x=0;x<this.length;x++){l+=k.charAt(j.indexOf(this.charAt(x)));}return l;

Quote:
}       alert("uggc://jjj.ernqgurshpxvatznahny.pb.hx/".r()); // Atrax, MVP

2002.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Sun, 20 Feb 2005 08:37:35 GMT  
 Download component

Quote:

> Is there some ActiveX component (preferably included with IE 5+) that
> can download a file?  I need to run this in a WScript (.js) file
> locally.

> I'm looking for some component that acts like this:

> var myobj=new ActiveXObject(...);
> //download some files from mywebsite to c:/
> myobj.download("http://mywebsite/file1.exe","c:/file1.exe");
> myobj.download("http://mywebsite/file2.exe","c:/file2.exe");

Hi

You can use adodb.stream from this (ADO 2.5+, comes with MDAC 2.5+)

Scripts in the newsgroup articles below needs IE 5+ for "Microsoft.XMLHTTP" and
ADO 2.5+ for "adodb.stream"


Subject: Re: How Can I Copy Remote Files?
Newsgroups: microsoft.public.scripting.jscript
Date: 2001-02-27 20:06:04 PST
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&selm=%23wGXLpToAHA...


Subject: copy gif file from web page to client machine.
Newsgroups: microsoft.public.office.developer.web.components,
microsoft.public.scripting.jscript, microsoft.public.scripting.VBScript,
microsoft.public.vi.general, microsoft.public.vstudio.development
Date: 2002-04-21 09:56:43 PST
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&th=8eba30565d9588af

--
torgeir



Sun, 20 Feb 2005 08:44:20 GMT  
 Download component

Quote:

> there are security risks involved with this - you can't sdave to a
> user's hard-drive without signed ActiveX and the user's explicit
> permission.

> XMLHTTP, which shipped as part of IE5, can download stuff from your
> site, but you're not going to be able to save it. can you imagine the
> security implications if you could????

Hi

The OP wrote "I need to run this in a WScript (.js) file locally". To me, that
sounds like he wants to run the scripts using WSH (wscript.exe). The security
constraints in the Web browser is then not an issue, and the task is easily
solvable with the "adodb.stream" object togheter with "Microsoft.XMLHTTP"

--
torgeir



Sun, 20 Feb 2005 08:50:12 GMT  
 Download component
if(ado >= 2.5 && (xmlhttp))return "Success."


says...

Quote:

> > there are security risks involved with this - you can't sdave to a
> > user's hard-drive without signed ActiveX and the user's explicit
> > permission.

> > XMLHTTP, which shipped as part of IE5, can download stuff from your
> > site, but you're not going to be able to save it. can you imagine the
> > security implications if you could????

> Hi

> The OP wrote "I need to run this in a WScript (.js) file locally". To me, that
> sounds like he wants to run the scripts using WSH (wscript.exe). The security
> constraints in the Web browser is then not an issue, and the task is easily
> solvable with the "adodb.stream" object togheter with "Microsoft.XMLHTTP"

> --
> torgeir



Sun, 20 Feb 2005 10:51:18 GMT  
 Download component
doh. I give up now. I wasn't paying proper attention - this is what
happens when you try and answer queries, configure Apache, slice a PSD
AND deploy a set of changed files all at once.

function String.prototype.r(){// Javascript rot13 en/decipherment. run
me for Atrax's signature
        var a='nopqrstuvwxyz';var b='abcdefghijklm';var j='/:.'+a+b;var
k='/:.'+b+a;var l='';
        for(var
x=0;x<this.length;x++){l+=k.charAt(j.indexOf(this.charAt(x)));}return l;

Quote:
}       alert("uggc://jjj.ernqgurshpxvatznahny.pb.hx/".r()); // Atrax, MVP

2002.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Sun, 20 Feb 2005 13:09:29 GMT  
 Download component
Yes, quite obviously it would be a great security risk if this was run
from a website, but I did mention that this is a WScript, which is
launched by the user on the hard drive, and WScript had full access
anyway.  Therefore this is not a security threat.


Quote:
> there are security risks involved with this - you can't sdave to a
> user's hard-drive without signed ActiveX and the user's explicit
> permission.

> XMLHTTP, which shipped as part of IE5, can download stuff from your
> site, but you're not going to be able to save it. can you imagine the
> security implications if you could????

> function String.prototype.r(){// Javascript rot13 en/decipherment. run
> me for Atrax's signature
>    var a='nopqrstuvwxyz';var b='abcdefghijklm';var j='/:.'+a+b;var
> k='/:.'+b+a;var l='';
>    for(var
> x=0;x<this.length;x++){l+=k.charAt(j.indexOf(this.charAt(x)));}return l;

> }  alert("uggc://jjj.ernqgurshpxvatznahny.pb.hx/".r()); // Atrax, MVP
> 2002.

> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!



Sun, 20 Feb 2005 19:48:21 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. ActiveX upload/download component???

2. Component Download of Comctl32.cab

3. Windows Scripting Component Download

4. Has anyone managed to download the ScriptControl OLE component?

5. Read the properties of a component in the "Component services"

6. Ugliness: GetObject in JScript component, TLB for multiple components, etc.

7. I am looking for a HTTP/1.1 ASP component

8. urgent: Codepage in a scripting component

9. Fabricated Recordset in ASP won′t pass to VB component

10. Text editor Component?

11. Capturing an event in MSIE raised by an ActiveX component

12. ASP component link error

 

 
Powered by phpBB® Forum Software