Jump to content

Archived

This topic is now archived and is closed to further replies.

wisewood

Running an application on the server

Recommended Posts

**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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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}"

Share this post


Link to post
Share on other sites
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.

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

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.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.