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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.