Solved

run client side program

Posted on 2004-04-09
10
245 Views
Last Modified: 2013-12-25
hi...i have a perl script which runs a program on the server and then i would like it to run a program (pro/engineer) on the client's machine...what commands should i use? if i were running pro/e from the command line i would type

c:/proewildfire c:/TEMP/trial.txt

thanks!
jess
0
Comment
Question by:jlm661
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
10 Comments
 
LVL 12

Expert Comment

by:venkateshwarr
ID: 10793757

You can run a javascript

<script>
   var ws = new ActiveXObject("WScript.Shell");
   ws.Exec("c:/proewildfire c:/TEMP/trial.txt")
</script>
0
 

Author Comment

by:jlm661
ID: 10793797
okay here is my cgi code right now

#!/usr/bin/perl -wT

use CGI;

$ENV{'PATH'} = '/usr/sbin:/usr/bin';

print "Content-type: text/plain\n\n";

$dir = "/home/edog.1/jlm661/nsga/GA/";
chdir $dir or die "Can't cd to $changedir: $!";
print "changed dir okay\n";

$result2 = system("./deviation1");
if ($result2)
{
print "Error: Couldn't run $result2: $!";
}


sub dienice {
      my($msg) = @_;
      print "<h2>Error</h2>\n";
      print $msg;
      exit;
}

so where would i put the javascript??
0
 
LVL 12

Expert Comment

by:venkateshwarr
ID: 10793836

you can say,

print "<script> var ws = new ActiveXObject(\"WScript.Shell\"); ws.Exec(\"c:/proewildfire c:/TEMP/trial.txt\") </script>"

anywhere in the script.
0
Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.

 
LVL 12

Accepted Solution

by:
venkateshwarr earned 250 total points
ID: 10793860
#!/usr/bin/perl -wT

use CGI;

$ENV{'PATH'} = '/usr/sbin:/usr/bin';

print "Content-type: text/plain\n\n";

$dir = "/home/edog.1/jlm661/nsga/GA/";
chdir $dir or die "Can't cd to $changedir: $!";
print "changed dir okay\n";

print "<script> var ws = new ActiveXObject(\"WScript.Shell\"); ws.Exec(\"c:/proewildfire c:/TEMP/trial.txt\") </script>"

$result2 = system("./deviation1");
if ($result2)
{
print "Error: Couldn't run $result2: $!";
}


sub dienice {
     my($msg) = @_;
     print "<h2>Error</h2>\n";
     print $msg;
     exit;
}
0
 

Author Comment

by:jlm661
ID: 10795246
sweet...thank you! i will try it tomorrow and let you know how it goes!

HTANKS AGAIN!!!
jess
0
 
LVL 84

Expert Comment

by:ozo
ID: 10798437
You'll need Content-type: text/html not text/plain to run Javascript
0
 
LVL 48

Expert Comment

by:Tintin
ID: 10809747
Be aware that any Javascript/ActiveX solution is going to be very limited in its application as it will depend on things such as browser version, OS, browser settings and security settings.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
add if statement powershell 8 58
BatchFile-Disk Detection 23 54
Psexec with Powershell to install critical patches 5 75
script to read text file 34 33
In this tutorial I will focus on how to use WhizBase as a tool for sending ICQ messages to ICQ. Here I will use a new technology in WhizBase, published in WhizBase 5.1 version. In this tutorial I will use 3 files, pager.wbsp for the processing, e…
Batch, VBS, and scripts in general are incredibly useful for repetitive tasks.  Some tasks can take a while to complete and it can be annoying to check back only to discover that your script finished 5 minutes ago.  Some scripts may complete nearly …
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question