Online Shopping : Computers : Programming : Languages : PHP : Installation and Setup : Operating Systems : Windows

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

8 of 8 people (100%) answered Yes
Recently 7 of 7 people (100%) answered Yes

Entry

Is it possible to set up PHP to work with the Windows scripting host like ActiveState's ActivePerl?

Oct 29th, 2002 13:54
J Wynia, Damian Boune,


Sort of. PHP can access most of the COM objects, their properties and
methods that make up the Windows Script Host functionality. It, however,
cannot be used like VBScript, JScript or Perl inside things like Windows
Script Components.
You can use the WSH objects like the following example which uses the
"shell" object to read the registry.
$shell = new COM("WScript.Shell") or die("This thing requires Windows
Scripting Host");
$registry_proxystring =
$shell->RegRead("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet
Settings\\ProxyServer");
You can't, however, put <script language="php"> in a .wsc, .wsf, etc.
file like you would with VBScript or JScript.