title: How to get output from ExecDos::exec
body: <p>When I execute <code>netstat -a |find /C $portNumber</code> in command prompt I get the total number of lines where the given port number exists. </p>
  
  <p>I want to get that same count in any variable so that I can check whether the port is already occupied or free in NSIS.</p>
  
  <p>I am excuting the below command and I tried in many ways, but I'm not able to get the output of the ExecDos::exec in a variable or in the stack.</p>
  
  <pre><code>ExecDos::exec "netstat -a |find /C '$portNumber'| $output"
  </code></pre>