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.