in reply to Re^2: Execute wmic command in cmd
in thread Execute wmic command in cmd

as you can see wmic command is execute and i got the "wmic:root\cli>" prompt and here i have to execute the "diskdrive get status" command that will show me if the disk is ok or not.

You can do it that way. (Ie. interactive mode.)

But, you can also do it all in one go: wmic diskdrive get status as I showed above. (Try it it on your command line. )

And the second way is the easiest way to do it from a program. (Again; try the code I posted for yourself.)

It is not just the easiest way. Trying to use the interactive mode from within a Perl program is (almost) impossible.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.