php function to call vbs

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • drec

    #1

    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? Or in other words, have a
    php script call a vbs file.

  • lorento

    #2
    Re: php function to call vbs


    drec wrote:[color=blue]
    > 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.[/color]


    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("MSScriptCo ntrol.ScriptCon trol");
    $VBScript->Language = "VBScript";

    $VBCode = ""; //your vbscript here

    $VBScript->AddCode($VBCod e);

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

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

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

    ?>

    regards,

    Lorento
    --

    Free online XML PAD Creator Editor for you. Our software maker suit for your shareware or freeware and trialware.


    Comment

    Working...