delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/05/13/14:22:48

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00
X-Spam-Check-By: sourceware.org
Message-ID: <4A0B0FC2.3020707@t-online.de>
Date: Wed, 13 May 2009 20:21:54 +0200
From: Christian Franke <Christian DOT Franke AT t-online DOT de>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.21) Gecko/20090403 SeaMonkey/1.1.16
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: WMIC
References: <64de84830905120629h1f07770ak9b91915c41f868ec AT mail DOT gmail DOT com> <1M3srY-208Trs0 AT fwd06 DOT aul DOT t-online DOT de> <64de84830905120953g4d02f37fmf33f164f6aa27041 AT mail DOT gmail DOT com> <4A09F803 DOT 5060509 AT gmail DOT com>
In-Reply-To: <4A09F803.5060509@gmail.com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Dave Korn wrote:
> Bruno Galindro da Costa wrote:
>   
>> Christian,
>>
>>    It Works perfectly for both! Can you explain why that commands
>> works and not only "wmic cpu list full"?
>>     
>
>   

The wmic.exe file imports console functions like SetConsoleMode() and 
SetConsoleScreenBufferSize() from kernel32.dll. I presume that wmic 
performs some direct console I/O which conflicts with Cygwin's tty. This 
can be prevented by redirecting the standard input. But then wmic 
creates an empty file 'TempWmicBatchFile.bat' in current directory ...


>>> The following works for me in Cygwin console (notty, tty, and mintty) on
>>> XP:
>>>
>>> $ echo '' | wmic cpu list full
>>>
>>> or
>>>
>>> $ wmic cpu list full </dev/null
>>>       
>
>   So, are some of you guys using a DOS console, and some using
> rxvt/xterm/whatever gui console?
>
>   

There is no difference in this case. Wmic hangs in Windows console, 
mintty, rxvt and xterm if run without redirection from a Cygwin shell.


-- 
Christian Franke


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019