Run the VBScript file(.vbs) from the browser - Javascript Language Basics

Javascript examples for Language Basics:VBScript

Description

Run the VBScript file(.vbs) from the browser

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <script type="text/vbscript">
  sub test/* www .  j  a va2  s.co m*/
    const runminimized = 7
    const dont_wait_for_end = false
    Set wshShell = CreateObject("WScript.Shell")
    WshShell.Run "c:\temp\test.vbs",runminimized, dont_wait_for_end
  end sub

      </script> 
   </head> 
   <body>
       these are the instructions 
      <button onclick="vbscript:test">Run the script</button>  
   </body>
</html>

Related Tutorials