How to stop a coded ui test using a batch file?

288 views Asked by At

I am running a coded ui script in infinite loop as per my requirement. I can start the coded ui test using the the mstest.exe.

I wanted to know is there any way using which I can stop the coded Ui test, any command that I can use in the batch file to stop the coded ui script?

1

There are 1 answers

2
Hackoo On BEST ANSWER

You can try this little batch to kill any process :

@echo off
Title Process Killer
Mode con cols=72 lines=5 & Color 0C
set Process2Kill=mstest.exe
Taskkill /IM "%Process2Kill%" /F
pause

And if you want to see more features like how to start a process and how to kill one process or multiple processes at once that interact with user input with a dynamic menu you should take a look at this post ==> How to check and correct user input when he omit the extension .exe to kill the process?