<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Using wmic to get info]]></title><description><![CDATA[<p dir="auto">I'm making a QT application to retrieve info from OS.I'm trying to access wmic.exe directly ( i added the path Windows\System32\wbem\ previously in the code ) and i don't want to use it through cmd.The code works fine in Windows Vista/7 but doesnt work in Windows XP</p>
<p dir="auto">Sample code :</p>
<p dir="auto">@   QProcess process;<br />
process.start(QString("wmic bios get serialnumber"));<br />
process.waitForStarted();<br />
process.waitForFinished();<br />
qDebug()&lt;&lt;process.readAll();<br />
system("pause");@</p>
<p dir="auto">Note : I'm using QT 4.6</p>
<p dir="auto">Any Ideas ?</p>
]]></description><link>https://forum.qt.io/topic/46320/using-wmic-to-get-info</link><generator>RSS for Node</generator><lastBuildDate>Tue, 21 Apr 2026 12:47:57 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/46320.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 24 Sep 2014 17:18:02 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Using wmic to get info on Thu, 02 Oct 2014 08:26:38 GMT]]></title><description><![CDATA[<p dir="auto">Solved same problem a year ago.<br />
This is part of working function from my app:</p>
<p dir="auto">@...<br />
QString Arguments = "/node:" + IP + " " + Args + " get /format:list";<br />
...<br />
Process.setProcessChannelMode (QProcess::MergedChannels);<br />
Process.start ("wmic");<br />
Process.waitForStarted ();<br />
Process.write (Arguments.toUtf8 ());<br />
Process.closeWriteChannel();</p>
<p dir="auto">while (Process.waitForReadyRead ())<br />
{<br />
while (Process.canReadLine())<br />
{<br />
...@</p>
]]></description><link>https://forum.qt.io/post/246007</link><guid isPermaLink="true">https://forum.qt.io/post/246007</guid><dc:creator><![CDATA[Fanaz]]></dc:creator><pubDate>Thu, 02 Oct 2014 08:26:38 GMT</pubDate></item><item><title><![CDATA[Reply to Using wmic to get info on Thu, 25 Sep 2014 20:23:46 GMT]]></title><description><![CDATA[<p dir="auto">What's the exit code ?</p>
]]></description><link>https://forum.qt.io/post/245326</link><guid isPermaLink="true">https://forum.qt.io/post/245326</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Thu, 25 Sep 2014 20:23:46 GMT</pubDate></item><item><title><![CDATA[Reply to Using wmic to get info on Thu, 25 Sep 2014 19:11:39 GMT]]></title><description><![CDATA[<p dir="auto">yes so if i set a short time for waitforfinished  lets say 2 sec , it will return empty result and program successfully ends</p>
]]></description><link>https://forum.qt.io/post/245314</link><guid isPermaLink="true">https://forum.qt.io/post/245314</guid><dc:creator><![CDATA[user55]]></dc:creator><pubDate>Thu, 25 Sep 2014 19:11:39 GMT</pubDate></item><item><title><![CDATA[Reply to Using wmic to get info on Thu, 25 Sep 2014 19:07:09 GMT]]></title><description><![CDATA[<p dir="auto">Did you check whether waitForStarted and waitForFinished returns true ?</p>
]]></description><link>https://forum.qt.io/post/245312</link><guid isPermaLink="true">https://forum.qt.io/post/245312</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Thu, 25 Sep 2014 19:07:09 GMT</pubDate></item><item><title><![CDATA[Reply to Using wmic to get info on Thu, 25 Sep 2014 18:38:20 GMT]]></title><description><![CDATA[<p dir="auto">There is literally 0 errors , that's why it's making me crazy</p>
]]></description><link>https://forum.qt.io/post/245309</link><guid isPermaLink="true">https://forum.qt.io/post/245309</guid><dc:creator><![CDATA[user55]]></dc:creator><pubDate>Thu, 25 Sep 2014 18:38:20 GMT</pubDate></item><item><title><![CDATA[Reply to Using wmic to get info on Thu, 25 Sep 2014 14:57:08 GMT]]></title><description><![CDATA[<p dir="auto">Did you read the standard out/error channels of QProcess ?</p>
]]></description><link>https://forum.qt.io/post/245292</link><guid isPermaLink="true">https://forum.qt.io/post/245292</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Thu, 25 Sep 2014 14:57:08 GMT</pubDate></item><item><title><![CDATA[Reply to Using wmic to get info on Thu, 25 Sep 2014 02:55:30 GMT]]></title><description><![CDATA[<p dir="auto">No error messages are printed out . In win xp it just shows the console dash like forever no results are shown and program never ends while in win vista/7 normal results are shown.</p>
<p dir="auto">I tried removing system("pause") same issue.</p>
]]></description><link>https://forum.qt.io/post/245204</link><guid isPermaLink="true">https://forum.qt.io/post/245204</guid><dc:creator><![CDATA[user55]]></dc:creator><pubDate>Thu, 25 Sep 2014 02:55:30 GMT</pubDate></item><item><title><![CDATA[Reply to Using wmic to get info on Wed, 24 Sep 2014 21:30:51 GMT]]></title><description><![CDATA[<p dir="auto">Are there any messages error, etc printed out ?<br />
What if you remove <em>system("pause");</em> line ?</p>
]]></description><link>https://forum.qt.io/post/245188</link><guid isPermaLink="true">https://forum.qt.io/post/245188</guid><dc:creator><![CDATA[andreyc]]></dc:creator><pubDate>Wed, 24 Sep 2014 21:30:51 GMT</pubDate></item><item><title><![CDATA[Reply to Using wmic to get info on Wed, 24 Sep 2014 20:46:58 GMT]]></title><description><![CDATA[<p dir="auto">yes im pretty sure 100%  u can even launch it from there and type the command and will work fine.I've been searching for a solution for days and no one is solving it.I'd appreciate it alott if u figure it out</p>
]]></description><link>https://forum.qt.io/post/245181</link><guid isPermaLink="true">https://forum.qt.io/post/245181</guid><dc:creator><![CDATA[user55]]></dc:creator><pubDate>Wed, 24 Sep 2014 20:46:58 GMT</pubDate></item><item><title><![CDATA[Reply to Using wmic to get info on Wed, 24 Sep 2014 20:34:35 GMT]]></title><description><![CDATA[<p dir="auto">Hi and welcome to devnet,</p>
<p dir="auto">Are you sure the command is available on XP and at the same place ?</p>
]]></description><link>https://forum.qt.io/post/245177</link><guid isPermaLink="true">https://forum.qt.io/post/245177</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Wed, 24 Sep 2014 20:34:35 GMT</pubDate></item></channel></rss>