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. Quote Link to comment 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 Quote Link to comment 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}" Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.