in reply to open2 with windows diskpart

The problem is (almost certainly) that diskpart does direct console IO, rather than file IO to STDOUT. I haven't yet found a workaround for this.

In theory, it should be possible to write an IPC::Open2-alike that uses Win32::Console (or better, the APIs that underlie that module), that would work regardless of the type of IO the child process uses.

The reality is that it is rather harder to do than it should be.


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.
RIP PCW

Replies are listed 'Best First'.
Re^2: open2 with windows diskpart
by wxfield (Novice) on Jun 17, 2009 at 00:42 UTC

    Hm. I've seen (and read) you post on this subject before.. I'm in this lousy situation where I must interact with diskpart to select, then list, then select, then list...etc. The select actions are dependent on the list of course. I know of no other way to interact with diskpart other than open2. Do you?