locked
Run a program installed in local machine from asp.net web page RRS feed

  • Question

  • User-1394018488 posted

    Hi,

    Good day to all, hope you working fine.

    Here I need a favour from you.

    I am trying to execute an installed program which was installed in the client machines and it should be executed while clicking a button from my asp.net web application. Since I am newer to this I am struck in the middle and help me out to sort out the program. I showed my sample java script code here with for your reference.

    function RunEXE1() {
    try {
    var oShell = new ActiveXObject("WScript.Shell");
    var oExec = WshShell.Exec("c:\\WINDOWS\\system32\\notepad.exe");
    }
    catch (err) {
    alert(err.Message);
    }

    Kindly help me out and let me know that is there any other way to do this action than JS.

    Thanks in advance!

    Regards,

    Priyadharshni.

    Monday, January 7, 2013 6:24 AM

Answers

  • User-718146471 posted

    Unfortunately, this is your only alternative. by nature, IIS is not supposed to run applications on the client machine due to security concerns. Imagine for a minute if the web server was allowed to force you to run a nepharious command like fdisk with a bunch of command line switches, a web server in that context would render your hdd useless. Think of the virus/botnet/worm implications, while your intentions may be noble, the web server simply won't do what you are asking it to do. You can do process.start for commands but that will only execute on the web server itself.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, January 7, 2013 6:29 AM
  • User-718146471 posted

    I sincerely doubt it. The only way that you could hope to do that would be to create a winforms client/server application. Webforms/asp.net will not permit that type of relationship. You could record the audio on the server and then offer a download link to the client as an option.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, January 7, 2013 6:44 AM

All replies

  • User-718146471 posted

    Unfortunately, this is your only alternative. by nature, IIS is not supposed to run applications on the client machine due to security concerns. Imagine for a minute if the web server was allowed to force you to run a nepharious command like fdisk with a bunch of command line switches, a web server in that context would render your hdd useless. Think of the virus/botnet/worm implications, while your intentions may be noble, the web server simply won't do what you are asking it to do. You can do process.start for commands but that will only execute on the web server itself.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, January 7, 2013 6:29 AM
  • User-1394018488 posted

    Much Thanks for your prompt reply :-). But I need a clarification, i am going to access a program which is going to process calls and it should be going to record the audio file. is it possible to run that file from server and work in client machine?

    Priya.

    Monday, January 7, 2013 6:39 AM
  • User-718146471 posted

    I sincerely doubt it. The only way that you could hope to do that would be to create a winforms client/server application. Webforms/asp.net will not permit that type of relationship. You could record the audio on the server and then offer a download link to the client as an option.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, January 7, 2013 6:44 AM
  • User-1394018488 posted

    I sincerely doubt it. The only way that you could hope to do that would be to create a winforms client/server application. Webforms/asp.net will not permit that type of relationship. You could record the audio on the server and then offer a download link to the client as an option.

    Oh okie then Thanks too! I move on with some other alternatives...

    Anyhow thanks for your favour.

    Regards,

    Priyadharshni.

    Monday, January 7, 2013 6:48 AM