| 
	
 | 
 Posted by lorento on 05/31/06 08:35 
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
 
  
Navigation:
[Reply to this message] 
 |