Executing Server Applications remotely

Thread Solved

Join Date: May 2006
Posts: 7
Reputation: brounemmanuel is an unknown quantity at this point 
Solved Threads: 0
brounemmanuel brounemmanuel is offline Offline
Newbie Poster

Executing Server Applications remotely

 
0
  #1
May 11th, 2006
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]
Reply With Quote Quick reply to this message  
Join Date: Mar 2006
Posts: 898
Reputation: KevinADC has a spectacular aura about KevinADC has a spectacular aura about 
Solved Threads: 67
KevinADC's Avatar
KevinADC KevinADC is offline Offline
Practically a Posting Shark

Re: Executing Server Applications remotely

 
0
  #2
May 12th, 2006
To run any system application with perl you use:

system()
backtiks: ` `
qx/ /
exec()

but exec exits the perl program. Whcih you use depends on what you are doing.
Reply With Quote Quick reply to this message  
Join Date: May 2006
Posts: 7
Reputation: brounemmanuel is an unknown quantity at this point 
Solved Threads: 0
brounemmanuel brounemmanuel is offline Offline
Newbie Poster

Re: Executing Server Applications remotely

 
0
  #3
May 12th, 2006
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



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]
Reply With Quote Quick reply to this message  
Join Date: Mar 2006
Posts: 898
Reputation: KevinADC has a spectacular aura about KevinADC has a spectacular aura about 
Solved Threads: 67
KevinADC's Avatar
KevinADC KevinADC is offline Offline
Practically a Posting Shark

Re: Executing Server Applications remotely

 
0
  #4
May 13th, 2006
I believe the error codes are specific to the operating system, so you may have to try and determine what 255 means for your operating system, personally I don't know. Maybe someone else can shed some light on this problem for you.
Reply With Quote Quick reply to this message  
Join Date: May 2006
Posts: 7
Reputation: brounemmanuel is an unknown quantity at this point 
Solved Threads: 0
brounemmanuel brounemmanuel is offline Offline
Newbie Poster

Re: Executing Server Applications remotely

 
0
  #5
May 14th, 2006
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]
Reply With Quote Quick reply to this message  
Join Date: Mar 2006
Posts: 898
Reputation: KevinADC has a spectacular aura about KevinADC has a spectacular aura about 
Solved Threads: 67
KevinADC's Avatar
KevinADC KevinADC is offline Offline
Practically a Posting Shark

Re: Executing Server Applications remotely

 
0
  #6
May 14th, 2006
You may want to post on another forum where there could be more members that have experience with this type of thing you are trying. Try perlmonks or devshed.
Reply With Quote Quick reply to this message  
Join Date: May 2006
Posts: 7
Reputation: brounemmanuel is an unknown quantity at this point 
Solved Threads: 0
brounemmanuel brounemmanuel is offline Offline
Newbie Poster

Re: Executing Server Applications remotely

 
0
  #7
May 24th, 2006
I relation to this subject i want to pass a parameter (Name) from a form and use it in subsequent execution execution of this perl program. how do i do that.
Is it possible to call a GUI remotely?
Reply With Quote Quick reply to this message  
Join Date: Mar 2006
Posts: 898
Reputation: KevinADC has a spectacular aura about KevinADC has a spectacular aura about 
Solved Threads: 67
KevinADC's Avatar
KevinADC KevinADC is offline Offline
Practically a Posting Shark

Re: Executing Server Applications remotely

 
0
  #8
May 24th, 2006
please start a new thread.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC