Knowledge Base Article

> Knowledge Base > Rapise

Created By  inflectra.adam Tuesday, November 15, 2016
Sometimes you need to run a  Windows batch file (.BAT) from Rapise. Unlike an executable, you cannot simply use Global.DoLaunch() to execute it since it's not actually an application. This article provides the code you need to use.
When you drag an application .EXE from the Files explorer to the main test script window (MyTest.js), Rapise automatically adds the following code:


This works well for executables, but for Windows Batch files (ones ending in .BAT), you need to use a different syntax, as shown below:

   var wsh = new ActiveXObject("WScript.Shell");

Article Info
  • Last Updated: 11/15/2016
  • Article ID: KB227
  • Views: 1146