title: call windows system command through fortran without showing the shell window and output the result to an external file
body: <p>I'm doing a little project using Fortran. A part of the code is designed to check the PC's mac address. Currently, I'm using call system command as follows:</p>
  
  <p><code>CALL SYSTEM("ipconfig -all &gt;result.tmp")</code> 
  Above code will invoke the windows ipconfig-all command and output the information to an external file result.tmp. Later this file will be read to check the mac address. </p>
  
  <p><a href="https://software.intel.com/en-us/forums/intel-visual-fortran-compiler-fo" rel="nofollow noreferrer">https://software.intel.com/en-us/forums/intel-visual-fortran-compiler-fo</a>...</p>
  
  <p>I tried that solution, it works fine for the system command "ipconfig -all", but I did not figure out how to output the result to an external file.  Does anyone can give me some hints on how to achieve that ?</p>
  
  <p>Above works, except one annoying thing. The Fortran code will be compiled as a DLL and used by another C# program. The annoying thing is, whenever above code is executed in the C# program, a console window will be prompted shortly and then closed. I searched the forum to find if there is some way to disable the window prompt, it turns out there is some solution in the following link:</p>