Jump to content


Photo

Running an application on the server


  • Please log in to reply
3 replies to this topic

#1 wisewood

wisewood
  • Members
  • PipPipPip
  • Advanced Member
  • 226 posts
  • LocationRotherham, England

Posted 28 April 2006 - 10:47 AM

**SOLVED**

I know using COM you can run MS Word on the server, but how would i go about running an application on the server such as C:\apps\my_application.exe

Any help greatly appreciated.
wisewood: proven fact, I am both wise, and wooden.

#2 craygo

craygo
  • Staff Alumni
  • Advanced Member
  • 1,973 posts
  • LocationRhode Island

Posted 28 April 2006 - 12:19 PM

Are you using IIS or apache or something else??

I have gone thru this before and it can be a pain in the ass!!!

I all comes down to permissions so you can go with that if you like.

Ray

#3 wisewood

wisewood
  • Members
  • PipPipPip
  • Advanced Member
  • 226 posts
  • LocationRotherham, England

Posted 28 April 2006 - 12:28 PM

currently running apache, and would prefer to find something to work with apache, though could if necessary switch to IIS.

i just want to be able to say "if(!$whatever){//launch this application on the server}"
wisewood: proven fact, I am both wise, and wooden.

#4 wisewood

wisewood
  • Members
  • PipPipPip
  • Advanced Member
  • 226 posts
  • LocationRotherham, England

Posted 28 April 2006 - 01:40 PM

Found a fix for this, perhaps there are better methods, but this one works.

Firstly, create a shortcut to the application you want to run, and put this shortcut in the windows directory on your webserver... then you just need to run this code in your script to execute the application you want.

<?
$WshShell = new COM("WScript.Shell");
$oExec = $WshShell->Run("your_shortcut.lnk", 3, false);
?>

Works well with the local intranet setup we have here, so it'll do for me.

Anyone with a better approach to this, feel free to speak up.
wisewood: proven fact, I am both wise, and wooden.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users