473,383 Members | 1,892 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,383 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 4826
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.