• 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 a .exe from Javascript

 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ho do we call an executable file from javascript on webkit browsers?

Any help or any pointers please?

Thanks,
Anubhav
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Not possible. What are you actually trying to accomplish?
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Think of the fun hackers would have if you could do it. Guessing you are using ActiveX on IE, which will be a setting nightmare for users.

Eric
 
Anubh Jain
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a webkit browser and I have a executable file(made from cpp) to download a video on my local system. I want to invoke that file from browser so that the video can be downloaded.

 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So create a link to the video file. The browser will download it and the user can play it. No need for an "exe" or anything else.
 
Anubh Jain
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I do have a url of video file from server.
I want to download the video file on that url so that it can be stored on my local drive.

How do i achive this?
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So you want to copy the video file from someone else's server?
 
Anubh Jain
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes I do want to copy a video from server(Not someone else's server. The server is also build by me only. That is how I got the url to download the server.)

So, is it possible using only javascript?
I dont think so. So i made a executable from cpp which could download video from any url. I just need to invoke that executable by passing the url to it.

 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't understand why you can't just create a link to the video file.
 
Anubh Jain
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Because I want to play the video even when my internet is down.
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Anubh Jain wrote:Because I want to play the video even when my internet is down.



I don't see how that's related to creating an exe file. What's the .exe going to do if the connection to the server is down? And you do know that the .exe is useless if the client accessing your application via a browser isn't on Windows OS, don't you? As Bear has said, downloading a video file from a server and playing it on the client system doesn't require any .exe to be created. I think you should really keep aside the .exe approach and use the straightforward approach of providing a download link. If you have trouble with that part, then explain what the issue is.
 
Jaikiran Pai
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To put this in a different way - have you ever seen any website which expects you to run a .exe file to download a video file and play it?
 
Anubh Jain
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, I haven't seen any website so far. That is why I am stuck at this point.

Besides, for your query for why to use a exe file:

Browser doesn't give me any functionality to download the video file. I can only buffer/stream the video.
But suppose I need to play the video even when my internet connection is not working or my server is down duw to some maintanence.

How will I achive this?


 
Jaikiran Pai
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Anubh Jain wrote:Yes, I haven't seen any website so far. That is why I am stuck at this point.


That's because what you are doing isn't the right way to do this.

Anubh Jain wrote:
Besides, for your query for why to use a exe file:

Browser doesn't give me any functionality to download the video file. I can only buffer/stream the video.


You haven't shown us the server side code where you are sending back the video as a response. But if you are saying that you don't see a window pop-up to save the file when you click on the link, then all you need to do is set the Content-Disposition response header as "attachment;" (google for it and you'll find more information).

Anubh Jain wrote:
But suppose I need to play the video even when my internet connection is not working or my server is down duw to some maintanence.


Once the user has downloaded the video (which of course will require server access) he won't need the access to the server anymore. So it won't matter if server is down.

 
Bartender
Posts: 4568
9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you want the video to work without the Internet, then the user needs to download the video. The easiest way to do this is to supply the link. An exe won't help play it remotely if the network isn't there, and an exe isn't needed to play it once it's downloaded.
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Which brings us right back to creating a link to the video file.
 
reply
    Bookmark Topic Watch Topic
  • New Topic