Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

WMIQUERY query

May
13,000
174
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>
 
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.)
 
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
 
Back
Top