Running Windows Batch Files in Test Complete(VBscript)
I am trying to execute bat file through code instead of using "TESTED APPS" as below..
--------------
sAutoAppPath = "E:\AutomationDir\Applications\InDMSApp_QA\bin\start_dms.bat"
Call Sys.OleObject("WScript.Shell").Run(sAutoAppPath )
and
Call Win32API.WinExec(sAutoAppPath, SW_SHOW)
--------------------------------------------------------------
WHile executing the above code i am finding error "System cannot find the file specified"
Can anyone please suggest the solution to execute the Bat file through the code?
Thanks in Advance.. :)
Kavan..
Thanks All,
Finally i got the solution on this..
Sys.OleObject("WScript.Shell").Run "C:\Windows\notepad.exe", SW_SHOWNORMAL
Win32API.WinExec "C:\Windows\notepad.exe", SW_SHOWNORMALAbove are the two ways working fine for me, problem i observed is the parenthesis and the syntax error which was not covered under error/warning that i was getting from testcomplete.
Cheers !!