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.
– rray
As far as I know, you can’t run files on the system on any browser except IE.
– djva
https://stackoverflow.com/questions/4252913/open-an-exe-file-through-a-link-in-a-html-file
– djva
exec('wscript "/var/www/html/laraluiz/public/Vbscript/Bloquear_usuario.vbs"'); so I tried but was unsuccessful.
– Luiz Gustavo Costa Ceolin
Did an error appear? vc want to run a vbs on linux?
– rray
No error returns. Yes, it is not possible?
– Luiz Gustavo Costa Ceolin
Luiz, execute
exec('wscript "/var/www/html/laraluiz/public/Vbscript/Bloquear_Usuario.vbs"',$output);
after avar_dump
in$output
to catch the return of the run.– Don't Panic
Give me that array(0) { }. But I just found out that linux server won’t be able to run a file. vbs.
– Luiz Gustavo Costa Ceolin
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>
– Luiz Gustavo Costa Ceolin