• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to call an exe from Javascript

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How do I call an exe on the local machine / on Web Server from JavaScript ?
My requirement is ....
I have a textbox in the HTML form where in I will have a file with pathname (Ex : If Local machine - C:/Test.doc ; If web server than http://webservername/virtualdirectoryname/test.doc )
When I click "Open File" button the file selected in the textbox should be opened in the appropriate editor.Means Test.doc should be opened in MS-WORD and not in browser window.
I should be able to open applications which does not support ActiveXObjects also and it must also work for applications for which no object can be created .
We also have editors that are very specific -- in order to display the results of chromatography, XRF, etc because the results are mostly stored in a binary format and only viewable via software of the instrument supplier (sometimes even instrument type en version specific).
And one more question is : Suppose the client doesn't have the required software/editor to open the file than can we call the software/editor exe from webserver and open the file in that exe ?
Can this be done using Javascript ?
I am trying it with wscript.shell .......
Thanks
Vinitha

 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm afraid you cannot call an exe by a javascript function.
When netscape loads a file, netscape looks for the file extension in the preferences -> Navigator -> Applications (quite similar to the base register in Windows) and asks the user if he wants to download the file onto the hard drive or open it with the application (plugin or standalone software) netscape has found in the preferred applications.
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi india(Vinitha),
i think u cannot execute an exe using javascript,but can be done in html using exec command...< ONCLICK="exec('ur exe file'); return false;"
regards
santosh
 
Ranch Hand
Posts: 4716
9
Scala Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
India,
I hate to say this but, your name does not comply with the Javaranch naming guidelines which can be found at http://www.javaranch.com/name.jsp
please register again with a valid name.
 
Ranch Hand
Posts: 1365
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually, this can be done. The problem is that it involves exploiting security vulnerabilities, which are subject to radical change from browser to browser, version to version. It also raises some legal concerns.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic