How to get the outputCoverage.xml data file automatically instead of press "Q" manually

Sep 28 at 10:01 AM
I use OpenCover to get the coverage of integration test, following is the details step (Operate in cmd):
  1. net stop w3svc /y
  2. OpenCover.Console.exe -target:C:\Windows\System32\inetsrv\w3wp.exe -targetargs:-debug -targetdir:C:\Inetpub\wwwwoot\MyWebApp\bin\ -filter:+[] -register:user
  3. Then there has a message:
    "Executing: C:\Windows\System32\inetsrv\w3wp.exe"
    "Press 'Q' to close the process"
  4. Press 'Q' manually, then it will generate the data xml successfully
    Now, my question is:
    Is these a way to generate the data xml automatically instead of press "Q" manually? Please give me a help, thanks!