title: How to get and store a network name
body: <p>Is there a way to get a WiFi/network name name that the computer I'm running the program on is connected, and then later on that same name is used in a <code>system()</code> function. I'm making a program to find the WiFi key when run on another Windows computer and then store it in a .txt file. Code:</p>
  
  <pre><code>system("netsh wlan show profile WiFi_name_here key=clear &gt;%USERPROFILE%\\Desktop\\key.txt");
  </code></pre>
  
  <p>P.S. I won't really store the actual file on Desktop this is just for test.</p>