我试图弄清楚我们是否可以从html或javascript执行WMIC。
wmic code : wmic /node:"server" /output:"C:test2.html" SERVICE where (state=”running”) get Name, Caption, State, ServiceType, StartMode, pathname /FORMAT:"htable.xsl"
html代码:
<html>
<head>
<script language="JScript">
Function cmds1()
{
var run=new ActiveXObject('WSCRIPT.Shell').Run("commands to run");
objShell.ShellExecute("cmd.exe", "", "", "open", 2);
}
</script>
<form name="input" action="test.asp" method="get">Server name <input type="text" name="Server">
<input id="E1" type="button" value="submit" onClick="cmds1()">
</form>
答案 0 :(得分:0)
我认为(并希望)你不能在客户端机器上做到这一点。您可以在此处查看有关致电exes的一般信息:What are some methods to link to and run a local .exe file in a local browser