in reply to How can I open and use a DOS window on another computer?

In order to use OLE to control an application, the appliation has to be OLE-enabled. That is to say, the program has to contain hooks (entrypoints) that allow it to respond to OLE commands and control.

cmd.exe is not (and almost certainly never will be) OLE enabled.


Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail
Hooray!
Wanted!

  • Comment on Re: How can I open and use a DOS window on another computer?

Replies are listed 'Best First'.
Re: Re: How can I open and use a DOS window on another computer?
by l3nz (Friar) on Nov 24, 2003 at 09:18 UTC
    In this case, you would not use Cmd.exe but rather WScript.Shell to perform file and network operations on a remote machine; and you can even launch programs from it (see The behavior of Win32::OLE->new from a couple of weeks ago). Being an OLE object, it's fully scriptable in Perl using Win32::OLE.

      Nice thought, but the OP's requirements were that the commands be executed in a visible command line window on the target machine, and I can't quite see how to do that using WSH? Either the commands will run in the background, or each will be started in it's own window I think?

      I guess a clearer explaination of what the OP is trying to achieve would make it easier to know what to suggest.


      Examine what is said, not who speaks.
      "Efficiency is intelligent laziness." -David Dunham
      "Think for yourself!" - Abigail
      Hooray!
      Wanted!