T
TonyV
I'm running ActiveState Perl version v5.6.1 built for MSWin32-x86-
multi-thread.
I have a script that is being run from another application (HP
Openview Operations for Windows) under the NT Authority\SYSTEM
account, and when I try to collect the output of a command using
something like this:
my $output = `defrag -a c:`;
It comes back blank. It doesn't matter which command I try to run, it
always comes back blank. I really need the output of the command. If
I redirect it to a file like so:
`defrag -a c: > c:\\test.txt`;
It puts the correct info into the file.
I'm not sure why the output is being suppressed. I checked that STDIN
and STDOUT exists using the if (-t STDIN && -t STDOUT), and they both
seem to be.
Does anyone know if there's something special I need to do when trying
to read the output of system commands when scripts are run from within
an automated service-type application? I'm trying to avoid echoing
the results to a file and reading the file in if possible.
Thanks!
multi-thread.
I have a script that is being run from another application (HP
Openview Operations for Windows) under the NT Authority\SYSTEM
account, and when I try to collect the output of a command using
something like this:
my $output = `defrag -a c:`;
It comes back blank. It doesn't matter which command I try to run, it
always comes back blank. I really need the output of the command. If
I redirect it to a file like so:
`defrag -a c: > c:\\test.txt`;
It puts the correct info into the file.
I'm not sure why the output is being suppressed. I checked that STDIN
and STDOUT exists using the if (-t STDIN && -t STDOUT), and they both
seem to be.
Does anyone know if there's something special I need to do when trying
to read the output of system commands when scripts are run from within
an automated service-type application? I'm trying to avoid echoing
the results to a file and reading the file in if possible.
Thanks!