如何转换运行php的批处理文件行在VBS脚本中执行相同操作

I have a batch file that runs a PHP script on a windows system.

php C:\php\after.php

I am looking to include this within a VBS. I am aware that I could run the existing batch file from the VBS but is there a way to make it run from within the VBS natively?

No, unfortunately there is no way to include the sub-commands off of the php framework into the vbscript environment. Even Visual studio which has access to all references and COM objects on the unit cannot access the PHP library.

However, Visual studio can work with PHP Tools which by extension can be utilized in Visual Studio. I apologize that that is the capacity of including PHP in other coding environments. -> Here

If you are just trying to convert the batch file to run from vbscript(even though it seems you have already researched this), view below.

You can achieve this with the Wscript.wshshell.run command, which can run practically any batch file commands as long as they are in the correct directory.

"Provides access to the native Windows shell." ~ Microsoft

e.g.

dim WshShell
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "php C:\php\after.php"
Const VbNormalFocus = 1
Const bWaitOnReturn = True

Dim wshShell
Set wshShell = CreateObject("WScript.Shell")

wshShell.Run "php " & "C:\php\after.php", VbNormalFocus, bWaitOnReturn

Set wshShell = Nothing

For more details: Run Method (Windows Script Host)