WMIQUERY query

#1
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
10,753
97
#2
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.)
 
#3
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