Hello all,

i am using an iperf utility in   Win32::Process::Create process in windows
for data transfer purposes.
the iperf.exe file is on windows and so working fine (by replacing $path to
$path->data/app/; and $command to $command->data/app/iperf -u -s -p 5001; in
below code)

now i wants this functionality to work by placing the iperf application in
phone (data/app) but i am not able to locate and execute that
application using the system() commands
i am using Perl interpreter on windows

i am using the below code.

could anybody please let me know the how can i incorporate these commands in
Win32::Process::Create  process?

#!/usr/bin/perl

#use strict;
#use warnings;
use Win32::Process;

my $file = 'my_output.txt';

# redirect stdout to a file
local *STDOUT;
open STDOUT, '>', $file
  or die "can't redirect STDOUT to <$file> $!";
my $path = exec("adb shell cd /data/app; ");
my $command = system("adb shell  data/app/iperf -u -s -p 5001; ");
Win32::Process::Create(my $ProcessObj,
                       "$path",
                       "$command",
                       0,
                       NORMAL_PRIORITY_CLASS,
                       ".") || die ErrorReport();
print "Hello\n";
#system("taskkill /F /IM /data/app/iperf.exe");
print "Bye\n";
sleep 10;
$ProcessObj->Kill(0);
    sub ErrorReport{
    print Win32::FormatMessage( Win32::GetLastError() );
}

/rocky

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

To unsubscribe, reply using "remove me" as the subject.

Reply via email to