Jump to content

exec in windows 7 workaround


QuickOldCar

Recommended Posts

I run some servers on windows machines due to linux file limits and being able to take snapshots in multiple ways.

 

I recently loaded Windows 7 pro 64 bit

 

For the server I use AppServ, could just as well  be WAMP or similar.

 

In the past I've used exec, also psexec in the pstools suite under server 2003 and also xp pro

http://technet.microsoft.com/en-us/sysinternals/bb896649

 

Here's what usually have to do to get the psexec working

place PsExec.exe into the windows\system32 folder

click on PsExec.exe and accept the EULA agreement

add PATH for psexec with exact location to the system enviroment

go to services.msc and set apache to interact with desktop, restart apache

 

Now under windows 7 with full admin rights for everything, no UAC, the above method does not work.

Is an additional workaround must do.

 

set apache service to manual

stop apache service

Browse to C:\AppServ\Apache2.2\bin\httpd.exe or equivalent.

Create a shortcut for httpd.exe

right click httpd.exe shortcut and select properties, set to run minimized

go to start, in the search type C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup

(this is a hidden file)

copy the httpd.exe shortcut to the startup folder

you can restart the server or click the shortcut for testing

 

here's a sample code to see if it now works

<?php
$WshShell = new COM("WScript.Shell");
$oExec = $WshShell->Run("notepad.exe", 7, false);
?>

 

If anyone has any other solutions please respond.

Link to comment
https://forums.phpfreaks.com/topic/240923-exec-in-windows-7-workaround/
Share on other sites

Archived

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

×
×
  • Create New...

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.