Re: php function to call vbs




drec wrote:
I am just getting my feet wet in php. Is there any way to execute a
vbscript file through using a php command? Or in other words, have a
php script call a vbs file.


You can use COM class. It allows you to instantiate an OLE compatible
COM object and call its methods and access its properties.

<?php
$VBScript = new COM("MSScriptControl.ScriptControl");
$VBScript->Language = "VBScript";

$VBCode = ""; //your vbscript here

$VBScript->AddCode($VBCode);

$input = $VBScript->Eval("getInput()");

$Shell = new COM("WScript.Shell");

//run
$Shell->Popup($input, '', '', '');

?>

regards,

Lorento
--
http://www.mastervb.net
http://www.padbuilder.com

.



Relevant Pages

  • php function to call vbs
    ... I am just getting my feet wet in php. ... Is there any way to execute a ... vbscript file through using a php command? ...
    (comp.lang.php)
  • Re: Attempt to de-mystify AJAX
    ... created and populated by the PHP script. ... string is initialized in line 1 to the opening select tag. ...
    (comp.databases.pick)
  • Re: File permissions for a wiki-like site
    ... the content using PHP scripts. ... content to be writable by my PHP script. ... The only one doing the writing will be the Apache user itself. ... The web user is used for things like ...
    (comp.lang.php)
  • Re: File permissions for a wiki-like site
    ... the content using PHP scripts. ... content to be writable by my PHP script. ... The only one doing the writing will be the Apache user itself. ... The web user is used for things like ...
    (comp.lang.php)
  • Re: File permissions for a wiki-like site
    ... the content using PHP scripts. ... content to be writable by my PHP script. ... The only one doing the writing will be the Apache user itself. ... The web user is used for things like ...
    (comp.lang.php)