note 87943 added to book.exec
| From: | JoeEngel at osu1 dot php dot net | Date: | Wed, 31 Dec 2008 22:46:02 +0000 |
| Subject: | note 87943 added to book.exec | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-148734@lists.php.net to get a copy of this message | ||
If you try to launch GUI apps from a service in Vista, you'll have lots of trouble. As a
security feature, Vista mediates the interaction of services with the desktop using
'Interactive Services Detection'.
That means, if you are running PHP as a module of an Apache service, you won't be able to
launch GUI apps using any method. This kind of thing just won't work:
$WshShell = new COM("WScript.Shell");
$oExec = $WshShell->Run("notepad.exe", 7, false);
So, if you want to use Apache/PHP as a proxy for launching GUI apps, you'll need to run Apache
as a console application.
First, if Apache is already installed as a service, you'll need to set it's startup type
to "manual" using the services snap-in. (%SystemRoot%\system32\services.msc) Search for
Services in the start menu search box.
Then add a shortcut to C:\apache\bin\httpd.exe (or wherever Apache is installed) to your Startup
folder, and set that shortcut to start minimized. You can use an app like TrayIt! to force Apache
down into the system tray.
Then use any of the methods outlined on the PHP website and you will be able to open a Windows
application from PHP and see it's GUI.
----
Server IP: 64.71.164.2
Probable Submitter: 76.88.182.252
----
Manual Page -- http://www.php.net/manual/en/book.exec.php
Edit -- https://master.php.net/note/edit/87943
Del: integrated -- https://master.php.net/note/delete/87943/integrated
Del: useless -- https://master.php.net/note/delete/87943/useless
Del: bad code -- https://master.php.net/note/delete/87943/bad+code
Del: spam -- https://master.php.net/note/delete/87943/spam
Del: non-english -- https://master.php.net/note/delete/87943/non-english
Del: in docs -- https://master.php.net/note/delete/87943/in+docs
Del: other reasons-- https://master.php.net/note/delete/87943
Reject -- https://master.php.net/note/reject/87943
Search -- https://master.php.net/manage/user-notes.php