Welcome!

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

SignUp Now!

WMIQUERY /B?

May
12,846
164
When I do this

Code:
v:\> wmiquery /a . "select Name,ProcessId,DisplayName from Win32_service where Started='TRUE'" | head /n7
DisplayName = Application Information
Name = Appinfo
ProcessId = 6092

DisplayName = Windows Audio Endpoint Builder
Name = AudioEndpointBuilder
ProcessId = 1932

the class instances are separated by a single newlines.

But I didn't specify "/B". If I specify "/B" I get two newlines.

Can I get rid of the newlines altogether?
 
Specifying /A will insert a blank line between class instances.
Can there be an option that makes that NOT happen? (or are the blank lines coming from WMI)? I mean, is it worth a suggestion?
 
How do you plan to separate the classes then?

Why do they have to be separated? Is there some confusion here?

Code:
DisplayName = Application Information
Name = Appinfo
ProcessId = 6092
DisplayName = Windows Audio Endpoint Builder
Name = AudioEndpointBuilder
ProcessId = 1932

I'm using @EXECARRAY to put the info in an array. Since I have asked for Name, ProcessId, and DisplayName, I can process the array with

Code:
do i=0 to %@dec[%_execarray] by 3
 
Back
Top