----- Original Message -----
From: "Chris Anderson" <[EMAIL PROTECTED]>

> And yes, he has tried forward slashes, versus backward slashes
> to no avail.
>

> Win32::Process::Create($ProcessObj,
>            'c:\\windows\\system32\\rsh.exe',
>            "rsh 213.165.192.242 -l intercable sh accounting >a.log",
>            0,
>            NORMAL_PRIORITY_CLASS,
>            'c:\\test');
>            $ProcessObj->Wait(2000);
>
> and get message
>
> Line has invalid autocommand "sh accounting >a.log"

Firstly, that looks like an error from RSH, not windows or perl.

Secondly, regarding the 'firstly' statement above, what makes one assume
that command or cmd is executing the process with Win32::Process?

The output redirection '>' is a function of the command interpreter, not of
RSH.  If you are operating without a command interpreter (i.e. shell), you
will not have access to such a function.  It looks to me like RSH is sending
that whole string to the remote server.  Do you intend to send the output of
the remote command to a log file on the remote server?  If so, you'll
probably have to quote the command to RSH.  Otherwise, you'd probably do
better to specify the command interpreter, e.g.: (not tested!)

 Win32::Process::Create($ProcessObj,
            'c:\\windows\\system32\\command.com',
            "command rsh 213.165.192.242 -l intercable sh accounting
>a.log",
            0,
            NORMAL_PRIORITY_CLASS,
            'c:\\test');
            $ProcessObj->Wait(2000);

HTH,

!c


_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to