-3

How do I run a .exe file created from visual studio solution with dependency files on a webpage? If I run the .exe directly like this:

<a href="Folder/App.exe" type="application/octet-stream">Check</a>

the first form opens, but then the next form doesn't open, but I have all the dependency files on the folder.

Opening the .exe file is not the problem but .exe depends on DLLs which are not working.

masonCOD
  • 39
  • 11
  • You need the client to download all of the DLLs. – SLaks Jul 09 '18 at 17:32
  • 1
    Web pages "run" on a client's browser. A browser won't execute exe files. It would be a huge security problem if they did. – gunr2171 Jul 09 '18 at 17:33
  • See: https://stackoverflow.com/questions/1403203/php-how-do-i-start-an-external-program-running-having-trouble-with-system-and – KIKO Software Jul 09 '18 at 17:34
  • @SLaks even if the client downloads all the DLLs, how can I fetch the values back to the webpage? – masonCOD Jul 09 '18 at 17:36
  • 1
    You can't. You should rewrite your UI in Javascript. – SLaks Jul 09 '18 at 17:38
  • @SLaks My application uses usb HID. so can't be done using javascript. – masonCOD Jul 09 '18 at 17:44
  • Possible duplicate of [Open an exe file through a link in a HTML file?](https://stackoverflow.com/questions/4252913/open-an-exe-file-through-a-link-in-a-html-file) – Heretic Monkey Jul 09 '18 at 18:13
  • @HereticMonkey As I said in the body, I am able to open the .exe file but not the DLLs. I don't see anything similar in the post you mentioned. – masonCOD Jul 09 '18 at 18:16
  • It says it's not possible in the duplicate... and it's still not possible, as you're finding out. I don't believe that it's working as you say it is, unless you're running the HTML file locally. – Heretic Monkey Jul 09 '18 at 18:19
  • The .exe file is opening since the file is on the server. – masonCOD Jul 09 '18 at 18:21
  • @masonCOD are you asking how you can make it such that your .exe pulls data from a webpage as a dependency or vis versa? –  Jul 09 '18 at 18:32
  • This is a huge security hole. I cannot think of any browser that allows an executable to run within the browser. – JazzmanJim Jul 09 '18 at 18:33

1 Answers1

1

A web browser doesn't have the capability to "Run" an .exe extension. The only way you're going to make this run in a browser is to re-write it in a language that your browser can understand. HTML, JavaScript, etc....