I've written a PERL script that prompts the user for some information and then does it's thing. If I'm on the remote system via MS remote desktop, the script works fine. If I access the remote system using
'psexec' from System Internals, it doesn't. It's results are somewhat predictable. If I invoke the
'psexec' without the
-i parm (the interactive flag), the system doesn't ask for any input. If I use the
-i parm, it waits for the input and then displays the prompt. I've boiled my test program to a very short example below:
#! perl
use strict;
use warnings;
my $commit;
print "***********************\n";
$commit = <>;
print "***********************\n";
In running the above example without the -i I get two rows of stars, with the -i it waits for a response and then gives two rows of stars. It's almost like I need a way to tell PERL to flush the STDOUT buffers before quering on STDIN, I think this is possible but don't know how.
I invoke the connection as
"psexec \\{host} cmd" to get a command shell to run the programs. I'm running AS 5.8.3-811 under 2003 server std ed. I appreciate your meditations...
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.