I want to execute a batch file
D:\\apache-tomcat-6.0.20\\apache-tomcat-7.0.30\\bin\\shutdown.bat
Which is on my server inidso
While I would recommend against this.
But you can use shutdown as client if the target machine has remote shutdown enabled and is in the same workgroup.
Example:
shutdown.exe /s /m \\ /t 00
replacing
with the URI for the target machine,
Otherwise, if you want to trigger this through Apache, you'll need to configure the batch script as a CGI script by putting AddHandler cgi-script .bat
and Options +ExecCGI
into either a local .htaccess
file or in the main configuration for your Apache install.
Then you can just call the .bat
file containing the shutdown.exe
command from your browser.