Link to home
Start Free TrialLog in
Avatar of jlm661
jlm661

asked on

using javascript to run command line commands

hi, i have a series of perl forms which collect data from a user and then run's a program. once the program is finished i would like to run a open the command line and run pro/engineer on the client's machine. i have done this using visual basic script but i have used javascript for other constraints on my forms so i thought i would try to stick with that. so i guess my question is what is the javascript equivalent of the wshShell command in vbs. and how can i have javascript run pro/e AFTER my first program is complete.

any help will be greatly appreciated!

thanks all!
Avatar of devic
devic
Flag of Germany image

hi jlm661.

look here:
================
JS example:
<script>
   var ws = new ActiveXObject("WScript.Shell");
   ws.Exec("c:\\Windows\\Notepad.exe")
</script>


VBS example:

<script language="VBScript">
    Set shell = CreateObject("WScript.Shell")
      shell.Run("c:\WINDOWS\Notepad.exe")
</script>
Avatar of jlm661
jlm661

ASKER

now does this script have to be inserted in the <head></head> of my page....if so how do i tell it to run those commands AFTER my other code??? thanks for the really quick reply :)
ASKER CERTIFIED SOLUTION
Avatar of devic
devic
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial