Forum Discussion

ankita_sharma's avatar
ankita_sharma
Occasional Contributor
12 years ago

Calling a VBscript with extension .vbs from Test Complete code



Hi All,



I am struggling hard but I have not got any clue on how to call a VB file from test complete.



Any body have any idea please help me out on it.



Thanks

Ankita
  • The simplest way is using WScript.Shell




    Set ws = Sys.OleObject("WScript.Shell")


    ws.Run("c:\somefile.vbs")

  • karkadil's avatar
    karkadil
    Valued Contributor
    The simplest way is using WScript.Shell




    Set ws = Sys.OleObject("WScript.Shell")


    ws.Run("c:\somefile.vbs")

      • HKosova's avatar
        HKosova
        SmartBear Alumni (Retired)

        jloyzagawh wrote:

        how would I code the call in jscript?


        var oShell = Sys.OleObject("WScript.Shell");
        oShell.Run("C:\\MyFolder\\MyScript.vbs");