This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: WMIC
On 2009-05-13, Christian Franke wrote:
> 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.
FWIW, these symptoms appear to be the same ones that nickle
exhibits: works fine when input is not from a tty or console, but
otherwise hangs after displaying its prompt. I reported the problem
to the cygwin-ports-general list (nickle is a cygwinports package).
The reply from Yaakov was that he could reproduce the problem but
didn't have a solution and didn't have time to investigate much
further. I looked briefly at the code, but didn't get very far and
haven't had time to look further either.
Regards,
Gary
--
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/