WMIQUERY query

May 20, 2008
12,167
133
Syracuse, NY, USA
Is an empty line between returned values expected? It's not particularly convenient (for something like DO /P). If I use "/B" I get two empty lines.
Code:
v:\> wmiquery /a . "select processid from win32_process"
0

4

272

400

<snip>
 

rconn

Administrator
Staff member
May 14, 2008
12,556
167
WAD - WMIQUERY is enumerating the properties of each object, and then displays a blank line before before enumerating the next object. In this case, you only have one property per object, but you wouldn't be very happy if you had multiple properties and they were not differentiated between objects.

(WMIQUERY has always behaved this way.)
 
May 20, 2008
12,167
133
Syracuse, NY, USA
That makes sense. Perhaps a future version will omit the extra line when only one property is queried.
Code:
v:\> wmiquery /a . "select processid,caption from win32_process"
Caption = System Idle Process
ProcessId = 0

Caption = System
ProcessId = 4

Caption = smss.exe
ProcessId = 272
 

Similar threads