php function to call vbs

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
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.

Re: php function to call vbs

drec wrote:
Quoted text here. Click to load it

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

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

$VBCode = ""; //your vbscript here


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

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

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




Site Timeline