|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
OPen program from browser
Hi, I'm trying to find some code that will open a clients program from a link on a web page. This is corporate intranet so nothing dodgy.
Bassically the user clicks on a link and Acrobat opens on their machine and Acrobat then opens a document on the intranet file system. I found something that looked like I was on the right track: <script language="vbscript"> Set WShell = CreateObject("WScript.Shell") WShell.Run "c:\program.bat" </script> Hope someone can help me! Thanks!
__________________
****************************************************************************** fear is the reason anything bad happens; a fearless person is less likely to live a long time |
|
#2
|
||||
|
||||
|
Just place the link to the .pdf file on the page. When the user clicks on the link, the browser plugin will automatically open acrobat in the browser and load the .pdf file into it.
|
|
#3
|
|||
|
|||
|
Thanks, I know I can link to the exe and have it open, but I would also like to set parameters as well but don't know how to do that.
browser - open acrobat - open file (network\file\location\filename.pdf) So you can see I'm not just trying to start acrobat, I'm also trying to tell it to do a few things as soon as it starts. I am also looking for a way to link to a program shortcut which has parameters set inside it... |
|
#4
|
||||
|
||||
|
If you are just wanting to load the file the all you have to do is just have the link to the file on the page.
i.e. <a href="/network/path/to/file.pdf">file.pdf</a> and when the user clicks the link, acrobat will start up and it will load the file.pdf file in. Simple as that. |
|
#5
|
|||
|
|||
|
Ok, forget Acrobat and assume I'm talking about an application that doesn't plug into explorer. There are ActiveX applications for purchase out there that for example let you launch an application, open a specified file, specify where the file must be saved etc etc, your sending a list or arguments to the program your opening.
(www.particlesoftware.com) is an example of such a tool. The application we will be launching from our intranet is some kind of CAD tool and there are a few parameters that we would like to parse through to the program we launch... |
|
#6
|
||||
|
||||
|
Hi. I'm trying to do exactly the same thing. The code I found is like this:
shell = new ActiveXObject("WScript.Shell"); shell.run("program.exe params"); My problems are: 1. when I test it from s single html file (by double clicking it) it starts and works just fine. But when I test the same file from my apache server it fails (like refusing to start an activex object) 2. even if I make it run I want to find a way to check when it stops in order to proceed with the rest of my code. Please if you find something let me know... |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Visual Basic Programming > OPen program from browser |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|