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.
In reply to Re^3: Execute wmic command in cmd
by BrowserUk
in thread Execute wmic command in cmd
by mvip
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |