jeudi 18 septembre 2014

Execute vbscript or batch file from IIS server running php


Vote count:

0




I am not sure if this possible but I have been able to execute shell commands so it leads me to belive it is, but I cannot run any .vbs or .bat scripts using the same method below. The command below works and I can see the results but anything further the server just hangs and timeouts. Side note - ActiveX works but is disabled on my phone, Chrome, and Firefox so this solution will need to work with a Safari browser


works



echo shell_exec("dir");


fails (I have even tried adding "&" to run the command in the background)



echo shell_exec("full path to script");


Background: I have a HTPC that I have connected to a monitor for regular use and connected to a big screen tv in my room. I have written a vbs to handle switching displays from monitor to tv and vice versa and also setting audio to tv instead of internal speakers and vice versa. This is an eloquent solution and saves me time from the minor annoyance of changing the setting, but I would like to take this a step further and have a server hosting these files so I can connect locally and change these settings (ideally while laying in bed and/or to show off some automation)


I have tried just about everything so any useful suggestions are encouraged. I anticipate its a small configuration or permission or path that is causing the time out. I do have my scripts hosted within the same directory as my index.php file (wwwroot/) and I have tried calling the file numerous ways.


Thanks in advance for any help.



asked 1 min ago







Execute vbscript or batch file from IIS server running php

Aucun commentaire:

Enregistrer un commentaire