#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2003
    Location
    melbourne australia
    Posts
    54
    Rep Power
    12

    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. #2
  3. /(bb|[^b]{2})/

    Join Date
    Nov 2001
    Location
    Somewhere in the great unknown
    Posts
    5,163
    Rep Power
    793
    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.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2003
    Location
    melbourne australia
    Posts
    54
    Rep Power
    12
    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...
    ******************************************************************************
    fear is the reason anything bad happens; a fearless person is less likely to live a long time
  6. #4
  7. /(bb|[^b]{2})/

    Join Date
    Nov 2001
    Location
    Somewhere in the great unknown
    Posts
    5,163
    Rep Power
    793
    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.
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2003
    Location
    melbourne australia
    Posts
    54
    Rep Power
    12
    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...
    ******************************************************************************
    fear is the reason anything bad happens; a fearless person is less likely to live a long time
  10. #6
  11. ...grows funny creatures
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2002
    Location
    Athens, Greece
    Posts
    44
    Rep Power
    13
    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...

IMN logo majestic logo threadwatch logo seochat tools logo