How to get subprocess output of wmic in C++
<p>I am making a tool in c++ to get the UUID of a computer, however I need to get the subprocess output of wmic and set it as a variable. </p>

<p>wmic command I will use. </p>

<pre><code>wmic csproduct get uuid
</code></pre>

<p>My question is how will I set the output of this subprocess to a variable? </p>

<p>I have managed to do it python, however Im not sure how to do it in c++.</p>

<p>Python code:</p>

<pre><code>x = subprocess.check_output('wmic csproduct get UUID')
</code></pre>