0

I want to open a exe file in a particular in my computer. I used the below code in javascript to do that. But its not displaying the application.

if (txtfile.value != "" && username.value != "") {
        var oShell = new ActiveXObject("WScript.Shell");
        var prog = "\\\\Test-PC\\Programms\\" + username.value + "\\" + language.value + "\\" + txtfile.value + "\\" + txtfile.value + ".exe";
        oShell.Run('"' + prog + '"', 1);
    } else {
        alert('The file name must be entered in file name textbox');
    }

I am using IE11 browser. Can anyone help me to do this?

Thanks in advance.

Balaji Kondalrayal
  • 1,718
  • 2
  • 19
  • 38

0 Answers0