I want to execute a process named notepad.exe or any exes in javascript and i want to handle the process in javascript by giving input and so on. I think there is a shell command used in javascript to create process can anybody brief me or help me with the example how to work with process in javascript?
Not possible. JavaScript does not have any context or control outside of your browser window. ActiveX is a viable alternative, but not a good one.
Check this page to see if it helps. But I recommend you DO NOT do it.
http://www.dotnetspider.com/resources/19547-Run-exe-file-Java-Script.aspx
What exactly is your requirement. May be we can come up with a better solution.
In a regular web page that is not possible. The script isn't allowed to create the shell object that is needed.
You would have to use an .hta (hypertext application) page to get the permission required for this.
Example:
<html>
<head>
<title></title>
<script>
new ActiveXObject('Shell.Application').ShellExecute('Notepad.exe');
</script>
</head>
<body>
</body>
</html>
This is not possible on purpose. Obviously people would not want untrusted websites to control tasks on their computer. That would make it very easy to hack in their computers.
What do you need this functionality for?