0

hey.can someone help me?
i tried executing calc.exe and notepad.exe from browser using
javascript but it doens't work.

like this:

 <script language="javascript" type="text/javascript">
    function runApp() 
    { 
    var shell = new ActiveXObject("WScript.shell"); 
    shell.run("notepad.exe", 1, True); 
    } 
    </script>

or using this:
System.Diagnostics.Process.Start("C:\WINDOWS\system32\calc.exe");

none of the above code works.
no erros were displayed just nothing happens.
it shows "error on page" at the taskbar of the browser when executing the script.

is there any configuration i have to make?
i tried enabling running active x components in internet tools.but still it doesn't work.

any other configuration?or sample codes??
can someone help me??

thanks in advance.

3
Contributors
4
Replies
5
Views
4 Years
Discussion Span
Last Post by pritaeas
0

Why don't you make a JavaScript calculator. There are loads of scripts available. As for a notepad, just make a text area input, with CSS height and width of 100%. Then php to receive and process it. Or make it store the note as local storage. Pretty sure all browsers don't support that type of command that you're after, as pritaeas has said above

0

i think i have no permission to execute external programs?
when i run echo exec('whoami');
it returns wwwrun.
is this permission issue???
if that so, how can give permission to wwwrun to run exec functions?
my server is linux opensuse and apache2 server.
thanks

0

Yes, it's a permission issue. Even if you do this, note that your are running a program on the server, and not on the client (as stated in the original question).

If you still want to know how to do this, I suggest asking in the *nix forum.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.