vinaynahata Posted January 4, 2011 Share Posted January 4, 2011 I am trying a very simple thing , just to run an exe on local WAMP environment.The code below launches does launch notepad(can see in task manager) but doesn't show up.I want test.txt to be opened in a window. <?php $WshShell = new COM("WScript.Shell"); $oExec = $WshShell->Run("notepad.exe C:\wamp\www\test.txt", 3, true); ?> I have tried exec as well .Same problem.What modifications are needed? Quote Link to comment https://forums.phpfreaks.com/topic/223344-problem-in-executing-an-exe-on-local-wamp-environment-from-php/ Share on other sites More sharing options...
trq Posted January 4, 2011 Share Posted January 4, 2011 It's likely your server doesn't have permissions to open the window manager. Not sure how you would go about this under windows, or if it is even possible. Quote Link to comment https://forums.phpfreaks.com/topic/223344-problem-in-executing-an-exe-on-local-wamp-environment-from-php/#findComment-1154536 Share on other sites More sharing options...
vinaynahata Posted January 4, 2011 Author Share Posted January 4, 2011 I am just trying things on localhost,any tweaks necessary in the WAMP config to make this work? Quote Link to comment https://forums.phpfreaks.com/topic/223344-problem-in-executing-an-exe-on-local-wamp-environment-from-php/#findComment-1154537 Share on other sites More sharing options...
trq Posted January 4, 2011 Share Posted January 4, 2011 I doubt very much your going to get it to work. But like I said, it would be a permissions issue, nothing to do with PHP. Quote Link to comment https://forums.phpfreaks.com/topic/223344-problem-in-executing-an-exe-on-local-wamp-environment-from-php/#findComment-1154540 Share on other sites More sharing options...
QuickOldCar Posted January 4, 2011 Share Posted January 4, 2011 Try psexec, is part of the pstools suite. http://technet.microsoft.com/en-us/sysinternals/bb897553 Also go to apache service in control panel and allow interaction with desktop. Set any login credentials as well. Ant other questions about psexec can be answered in the psexec forums. Quote Link to comment https://forums.phpfreaks.com/topic/223344-problem-in-executing-an-exe-on-local-wamp-environment-from-php/#findComment-1154552 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.