The West Australian - 2019-06-12 - TODAY -. Eve Morey will likely not return to acting, despite being nominated for a Gold Logie. The 36-year-old former Neighbours star was shocked when she was announced last month as one of seven nominees for the coveted most popular personality award.
I want to execute a batch file
D:apache-tomcat-6.0.20apache-tomcat-7.0.30binshutdown.bat
Which is on my server
inidsoasrv01
.How should I write my
.bat
file?parth bhoraniaparth bhorania
4 Answers
Use microsoft's tool for remote commands executions: PsExec
If there isn't your bat-file on remote host, copy it first. For example:
And then execute:
Note: filepath for psexec is path to file on remote server, not your local.
Dmitry PolyakovDmitry Polyakov
You can use WMIC or SCHTASKS (which means no third party software is needed):
1) SCHTASKS:
2) WMIC (wmic will return the pid of the started process)
npocmakanpocmaka
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:
replacing
<target-computer-name>
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.F. Stephen QF. Stephen Q
shutdown.exe /s /m <target-computer-name>
should be enough shutdown /?
for more, otherwiseUPDATE:
Seems shutdown.bat here is for shutting down apache-tomcat.
So, you might be interested to psexec or PuTTY: A Free Telnet/SSH Client
As native solution could be
wmic
Example:
wmic /node:<target-computer-name> process call create 'cmd.exe c:somefolderbatch.bat'
In your example should be:
wmic /?
and wmic /node /?
for moreCommunity♦
PaulPaul