wisewood Posted April 28, 2006 Share Posted April 28, 2006 **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.exeAny help greatly appreciated. Link to comment https://forums.phpfreaks.com/topic/8619-running-an-application-on-the-server/ Share on other sites More sharing options...
craygo Posted April 28, 2006 Share Posted April 28, 2006 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 Link to comment https://forums.phpfreaks.com/topic/8619-running-an-application-on-the-server/#findComment-31637 Share on other sites More sharing options...
wisewood Posted April 28, 2006 Author Share Posted April 28, 2006 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}" Link to comment https://forums.phpfreaks.com/topic/8619-running-an-application-on-the-server/#findComment-31642 Share on other sites More sharing options...
wisewood Posted April 28, 2006 Author Share Posted April 28, 2006 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. Link to comment https://forums.phpfreaks.com/topic/8619-running-an-application-on-the-server/#findComment-31668 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.