Forum Discussion

Feroz's avatar
Feroz
Occasional Contributor
8 years ago

How can i add a batch file using java script to the script routines.

Hi,

I am trying to add a batch file (located in my local) to my scripts that are developed using java script. Could you please help me with the code to add a batch file.

I know from the Tested Apps we can add a batch file. But, i wanted to use Java script code only.

 

Thanks in Advance

 

Regards,

Feroz

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    Consider using the WshShell object and then either the "Run" or "Exec" method to execute your batch file.

    • Feroz's avatar
      Feroz
      Occasional Contributor

      Thanks Martin. It worked!