| | |
Executing Server Applications remotely
Thread Solved |
•
•
Join Date: May 2006
Posts: 7
Reputation:
Solved Threads: 0
Hello
I am new in Perl and CGI. I want to write a program in perl that enables me to call executables, some of them maybe GUI.
My starting point was to write a small program that would call an interface because this is on a local machine. Ultimately i want to send commands to execute applications from a client.
The program i wrote gives me this error
Can't spawn "cmd.exe": No such file or directory at C:/www/cgi-bin/compound.pl line 8. child exited with value 255. what do i do to make run all my applications?
The program is like <>[HTML]
my $mouse = ("start /maximised /Program Files/DHI/MOUSE2002/Bin/Syrakus.exe");##"C:\Program Files\DHI\MOUSE 2002\Bin\Syrakus.exe" MOUSE2002_80
system $mouse ;
if ($? == -1)
{ print "failed to execute: $!\n"; }
elsif ($? & 127)
{ printf "child died with signal %d, %s coredump\n", ($? & 127), ($? & 128) ? 'with' : 'without'; }
else
{ printf "child exited with value %d\n", $? >> 8; }
[/HTML]
I am new in Perl and CGI. I want to write a program in perl that enables me to call executables, some of them maybe GUI.
My starting point was to write a small program that would call an interface because this is on a local machine. Ultimately i want to send commands to execute applications from a client.
The program i wrote gives me this error
Can't spawn "cmd.exe": No such file or directory at C:/www/cgi-bin/compound.pl line 8. child exited with value 255. what do i do to make run all my applications?
The program is like <>[HTML]
my $mouse = ("start /maximised /Program Files/DHI/MOUSE2002/Bin/Syrakus.exe");##"C:\Program Files\DHI\MOUSE 2002\Bin\Syrakus.exe" MOUSE2002_80
system $mouse ;
if ($? == -1)
{ print "failed to execute: $!\n"; }
elsif ($? & 127)
{ printf "child died with signal %d, %s coredump\n", ($? & 127), ($? & 128) ? 'with' : 'without'; }
else
{ printf "child exited with value %d\n", $? >> 8; }
[/HTML]
•
•
Join Date: May 2006
Posts: 7
Reputation:
Solved Threads: 0
Am not sure that gives me the answer, it is like it either starts the application but nothing shows or because of the error it doesnt. I wanted to know how i can get the error solved and how i can run different applications remotely.
thanks
thanks
•
•
•
•
Originally Posted by brounemmanuel
Hello
I am new in Perl and CGI. I want to write a program in perl that enables me to call executables, some of them maybe GUI.
My starting point was to write a small program that would call an interface because this is on a local machine. Ultimately i want to send commands to execute applications from a client.
The program i wrote gives me this error
Can't spawn "cmd.exe": No such file or directory at C:/www/cgi-bin/compound.pl line 8. child exited with value 255. what do i do to make run all my applications?
The program is like <>[html]
my $mouse = ("start /maximised /Program Files/DHI/MOUSE2002/Bin/Syrakus.exe");##"C:\Program Files\DHI\MOUSE 2002\Bin\Syrakus.exe" MOUSE2002_80
system $mouse ;
if ($? == -1)
{ print "failed to execute: $!\n"; }
elsif ($? & 127)
{ printf "child died with signal %d, %s coredump\n", ($? & 127), ($? & 128) ? 'with' : 'without'; }
else
{ printf "child exited with value %d\n", $? >> 8; }
[/html]
•
•
Join Date: May 2006
Posts: 7
Reputation:
Solved Threads: 0
Thank you Kevin,
I can run the application using the different methods, system,backticks and open on commandline. When i run a windowcomes up as expected and executes the comands it however doesnt work on internet even on same computer. The window should be able to come up on server and not affect the execution is it?
Please assist am stuck.
[HTML]
#@args = ("/Program Files/DHI/MOUSE 2002/Bin/mouse604.exe", '\MOUSE\Tutor1.mpr', "Ro", "Run", "Close", "NoPrompt","Minimize");
#@args1 =("/Program Files/DHI/MOUSE 2002/Bin/mouse604.exe", '\MOUSE\Tutor1.mpr', "HD" ,"Run", "Close", "NoPrompt","Minimize");
#system (@args)==0 or die "system failed at: $?";
#system (@args1)==0 or die "system failed at: $?";
$mouse = ("/www/cgi-bin/mouse.bat");
local *PIPE;
open (PIPE,"$mouse |")or die "Can not open pipe";
print while <PIPE>;
close PIPE;
#system $mouse ;
#@output=`@args`;
#@output=`@args1`;
[/HTML]
I can run the application using the different methods, system,backticks and open on commandline. When i run a windowcomes up as expected and executes the comands it however doesnt work on internet even on same computer. The window should be able to come up on server and not affect the execution is it?
Please assist am stuck.
[HTML]
#@args = ("/Program Files/DHI/MOUSE 2002/Bin/mouse604.exe", '\MOUSE\Tutor1.mpr', "Ro", "Run", "Close", "NoPrompt","Minimize");
#@args1 =("/Program Files/DHI/MOUSE 2002/Bin/mouse604.exe", '\MOUSE\Tutor1.mpr', "HD" ,"Run", "Close", "NoPrompt","Minimize");
#system (@args)==0 or die "system failed at: $?";
#system (@args1)==0 or die "system failed at: $?";
$mouse = ("/www/cgi-bin/mouse.bat");
local *PIPE;
open (PIPE,"$mouse |")or die "Can not open pipe";
print while <PIPE>;
close PIPE;
#system $mouse ;
#@output=`@args`;
#@output=`@args1`;
[/HTML]
![]() |
Similar Threads
- Updated : Simple ASP.Net Login Page (ASP.NET)
- Error message when executing stand-alone applications(apps with no dll files etc.) (Windows NT / 2000 / XP)
Other Threads in the Perl Forum
- Previous Thread: perl in bioinformatics
- Next Thread: Form data as input into Perl code
| Thread Tools | Search this Thread |





