Run . vbs file via php inside the server

Asked

Viewed 313 times

1

Good morning. I have a file in . vbs on my machine that disables some users in the company’s AD. I was wondering if it is possible to run this file inside my server via php. Has anyone ever done anything like that? I’ve been looking at some posts on the forum, but I didn’t succeed.

  • If you have no problem with credentials or permission you can do this by calling a command line in php.

  • As far as I know, you can’t run files on the system on any browser except IE.

  • https://stackoverflow.com/questions/4252913/open-an-exe-file-through-a-link-in-a-html-file

  • exec('wscript "/var/www/html/laraluiz/public/Vbscript/Bloquear_usuario.vbs"'); so I tried but was unsuccessful.

  • Did an error appear? vc want to run a vbs on linux?

  • No error returns. Yes, it is not possible?

  • Luiz, execute exec('wscript "/var/www/html/laraluiz/public/Vbscript/Bloquear_Usuario.vbs‌​"',$output); after a var_dump in $output to catch the return of the run.

  • 1

    Give me that array(0) { }. But I just found out that linux server won’t be able to run a file. vbs.

  • 1

    Using IE I managed to run this script, but with the application on my machine. <script> var shell = new Activexobject( 'Wscript.shell' ); shell.run( 'C: Users Luiz.ceolin Desktop Vbscrip Lock.vbs', 1, true ); </script>

Show 4 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.