473,241 Members | 1,520 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,241 software developers and data experts.

Direct file download

I need to download a file from an Intranet web site and feed it into a
program on the PC where the browser is running. Browser is Internet
Explorer. Both Javascript and VBscript are options.
Which would be my best options? Examples would be welcomed!
rj
Oct 28 '08 #1
6 4816
On Oct 28, 5:28*pm, raymond_b_jime...@yahoo.com wrote:
I need to download a file from an Intranet web site and feed it into a
program on the PC where the browser is running. Browser is Internet
That's one of the things that browsers do.
Explorer. Both Javascript and VBscript are options.
IE can do it as it is a browser. Script is not required.
Which would be my best options? Examples would be welcomed!
rj
Push out a blob of registry entries to associate the file type with
the program, map the appropriate MIME type to the file type, adjust
security settings, etc. These are tasks for your Intranet
administrator.
Oct 28 '08 #2
On Oct 28, 5:28*pm, raymond_b_jime...@yahoo.com wrote:
I need to download a file from an Intranet web site and feed it into a
program on the PC where the browser is running. Browser is Internet
Explorer. Both Javascript and VBscript are options.
Which would be my best options? Examples would be welcomed!
rj
Maybe this will help (doesn't need browser):

http://groups.google.com/group/micro...20d6c8e247f1fa

Once the file is available on the local machine, use the Wscript.Shell
in your script to start the application referencing the local file ...

sDownLoadedFile = "d:\somewhere\filename
with CreateObject("Wscript.Shell")
.Run "d:\location\your_application.exe " & sDownLoadedFile , 0, True
end

Tom Lavedas
===========
http://members.cox.net/tglbatch/wsh/
Oct 29 '08 #3
Thanks Tom. I had seen the code, I tested it again, but it doesn't
work. It won't execute
With CreateObject("ADODB.Stream")
Seems like the example is server side code, but I need it to run on
the client. Can you confirm the code sample can be executed in
VBScript on the client browser?
rj

On Oct 29, 2:12*pm, Tom Lavedas <tglba...@cox.netwrote:
On Oct 28, 5:28*pm, raymond_b_jime...@yahoo.com wrote:
I need to download a file from an Intranet web site and feed it into a
program on the PC where the browser is running. Browser is Internet
Explorer. Both Javascript and VBscript are options.
Which would be my best options? Examples would be welcomed!
rj

Maybe this will help (doesn't need browser):

http://groups.google.com/group/micro...ng.vbscript/ms...

Once the file is available on the local machine, use the Wscript.Shell
in your script to start the application referencing the local file ...

sDownLoadedFile = "d:\somewhere\filename
with CreateObject("Wscript.Shell")
* .Run "d:\location\your_application.exe " & sDownLoadedFile , 0, True
end

Tom Lavedas
===========http://members.cox.net/tglbatch/wsh/
Oct 29 '08 #4
Thanks David,
The idea is that the user only clicks once and generates the whole
process. I cannot associate the file type because they are doc files,
and they have to be openable by Word in Windows. The idea is to pass
them through another application. My main problem is downloading the
file to a special directory (temp directory) without the user having
to select it.
rj

On Oct 28, 9:38*pm, David Mark <dmark.cins...@gmail.comwrote:
On Oct 28, 5:28*pm, raymond_b_jime...@yahoo.com wrote:
I need to download a file from an Intranet web site and feed it into a
program on the PC where the browser is running. Browser is Internet

That's one of the things that browsers do.
Explorer. Both Javascript and VBscript are options.

IE can do it as it is a browser. *Script is not required.
Which would be my best options? Examples would be welcomed!
rj

Push out a blob of registry entries to associate the file type with
the program, map the appropriate MIME type to the file type, adjust
security settings, etc. *These are tasks for your Intranet
administrator.
Oct 29 '08 #5
On Oct 29, 11:42*am, raymond_b_jime...@yahoo.com wrote:
Thanks Tom. I had seen the code, I tested it again, but it doesn't
work. It won't execute
* * With CreateObject("ADODB.Stream")
Seems like the example is server side code, but I need it to run on
the client. Can you confirm the code sample can be executed in
VBScript on the client browser?
rj

On Oct 29, 2:12*pm, Tom Lavedas <tglba...@cox.netwrote:
On Oct 28, 5:28*pm, raymond_b_jime...@yahoo.com wrote:
I need to download a file from an Intranet web site and feed it into a
program on the PC where the browser is running. Browser is Internet
Explorer. Both Javascript and VBscript are options.
Which would be my best options? Examples would be welcomed!
rj
Maybe this will help (doesn't need browser):
http://groups.google.com/group/micro...ng.vbscript/ms...
Once the file is available on the local machine, use the Wscript.Shell
in your script to start the application referencing the local file ...
sDownLoadedFile = "d:\somewhere\filename
with CreateObject("Wscript.Shell")
* .Run "d:\location\your_application.exe " & sDownLoadedFile , 0, True
end
Tom Lavedas
===========
http://members.cox.net/tglbatch/wsh/
I didn't understand you original post to mean it was for client side
script. None of the ActiveX controls invoked in my examples will work
in client side scripting without significant security intervention/
risk. In fact, executing an application on a user's machine is
strictly verboten in an Inter/Intranet environment.

The only way I know to come close is to get the client to download an
HTA (Hypertext Application) and then use it to access the file and run
the application. In its simplest incarnation, an HTA is an HTML with
its extension changed to .hta. When run by the user on his local
machine, it can access all of the IE controls, but the security
environment is far less stringent. It can run ActiveX controls, such
as the MSXML, ADODB and Wscript Shell.

Tom Lavedas
===========
http://members.cox.net/tglbatch/wsh/

Oct 29 '08 #6
On Oct 29, 11:44*am, raymond_b_jime...@yahoo.com wrote:
Thanks David,
The idea is that the user only clicks once and generates the whole
process. I cannot associate the file type because they are doc files,
and they have to be openable by Word in Windows. The idea is to pass
them through another application. My main problem is downloading the
file to a special directory (temp directory) without the user having
to select it.
The browser does that for you. Give the ones on the server a
different extension. Your client side program can rename them to
DOC's when it is done processing them. Then the users can open them
in Word.
Oct 29 '08 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Jan Bols | last post by:
I'm using PHP 4.3 and APACHE2.0. I have a website that requires people to log in before they can download files from my website. A person is logged in if there is a session-variable $logged_in set...
1
by: Pavils Jurjans | last post by:
Hello, My ASP.NET hoster has made a separate folder in my hosting space and configured it as separate application in IIS. Further, I created "bin" folder in this directory, and put in my aspx...
1
by: Luis Esteban Valencia | last post by:
I am on an intranet I havent been able to download the visual web developer 2005 with that installer. Is there a direct link to download it? -- LUIS ESTEBAN VALENCIA MICROSOFT DCE 2....
1
by: Roy | last post by:
Hi, I have a problem that I have been working with for a while. I need to be able from server side (asp.net) to detect that the file i'm streaming down to the client is saved...
0
by: Bob Avallone | last post by:
MetaPro Systems Inc. Visual Studio Dot Net Tips & Tricks #3 – Direct Access to Your Outlook Address Book. Project Type: VS.NET Windows Application Code Behind: Visual Basic I have a project...
2
by: chris | last post by:
Hi! Is there any Way or have somebody a Function to do something like this copy skurs from 'http://ichart.finance.yahoo.com/table.csv?s=TKAG.DE&d=10&e=15&f=2004&g=d&a=3&b=5&c=1991&ignore=.csv'; ...
16
by: matt | last post by:
I have used some free code for listing files for download, but I want to send an email to the administrator when the file has been downloaded. I have got some code in here that does it, but it will...
1
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Many websites have a form or a link you can use to download a file. You click a form button or click...
2
by: yogarajan | last post by:
hi friends i have one problem. i m using forms authentication for my pages which consist of downloadable links (doc files, pdf files etc.,). the thing is, if i restrict access to the page, it...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.