samarudge Posted May 28, 2008 Share Posted May 28, 2008 Hi, I have been having problems running PsEXEC on Windows XP Pro with Apache 2.2 and PHP5. I have a PHP page with some code on and when someone visits the page I want the server to run a .exe program, I have used exec('notepad.exe'); (I have also tried system(); ) now that worked fine except that Notepad opened as a process not as a proper program. I downloaded PsEXEC because I was told that this would let me open the .exe properly but now all that happens when I visit the page is Notepad (I'm only using notepad as an example, what would be the point in having a web page that can open notepad on the server ) is not opened at all and PsEXEC goes into the system processes and the page wont load properly until I cancel the process through task manager. Regards, Sam Rudge Quote Link to comment https://forums.phpfreaks.com/topic/107602-solved-problem-with-psexec-and-executing-foreground-programs/ Share on other sites More sharing options...
MadTechie Posted May 28, 2008 Share Posted May 28, 2008 The problem you have is to do with account access, PHP is running from the System account so notepad is launched from the System account, what you need to is change the logon account for the APACHE service, to do this go Start -> Run type services.msc fine APACHE and double click Select the Log On Tab and change to 'Local System Account' & Allow services to interact with desktop this should now load up notepad with the current user profile. you may also try exec('start notepad.exe'); Quote Link to comment https://forums.phpfreaks.com/topic/107602-solved-problem-with-psexec-and-executing-foreground-programs/#findComment-551507 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.