Forum Discussion

anatar02's avatar
anatar02
Contributor
13 years ago

How to kill the Process busing testcomplete!!

Hi, 



I have a issues with launching an application, as it says that the instance is already running...



so i tried to kill the Process by following line of code 




  if(Sys["Process"](".AdminConsole")["Exists"]==true)


    {


    Sys["Process"](AdminConsole")["Terminate"]()


        Log["Message"]("The application is Close")


    }



the above code is working well and fine, when the application exist on the process but it gives error when the app is not exist on the process, could some one  please help me on this



even i have tried as 




    if(Sys["Process"]("RetailSuite.AdminConsole",-1))


    {


    Sys["Process"]("AdminConsole")["Close"]()


        Log["Message"]("The application is Close")


    }







 



1 Reply


  • The issue solved, I found a similar thread which helped me to solve my issue.