Run VBScript on server from javascript/php

2019-04-01 01:57发布

问题:

I have a Single Page Application written in JavaScript and PHP, I am trying to run an external .vbs file on my server?

I have tried using the php COM class as well as exec() to no avail. Has anyone successfully achieved this? Is it even possible?

回答1:

Found this gem: http://technet.microsoft.com/en-us/library/ee156587.aspx

By that, you should try the similar in PHP:

exec('wscript "C:/path/to/script.vbs"');