如何使用javascript从IE客户端启动Windows服务? [英] How to start a windows service from client side in IE using javascript?
问题描述
亲爱的朋友们,
请帮助我使用Javascript从IE客户端获取启动Windows服务的代码。
提前致谢
我的尝试:
我在html中尝试过以下代码,但它对我不起作用。
oShell = new ActiveXObject( WSCript.shell);
oShell.run(NET START [service]);
////或////
oShell.run(NET STOP [service]);
Dear Friends,
Please help me in getting the code to start a windows service from client side in IE using Javascript.
Thanks in advance
What I have tried:
I have tried the below code in html but it is not working for me.
oShell = new ActiveXObject("WSCript.shell");
oShell.run("NET START [service]");
////Or ////
oShell.run("NET STOP [service]");
推荐答案
如何使用javascript从IE客户端启动Windows服务?
How to start a windows service from client side in IE using javascript?
简答:你没有。因为名为'client SECURITY'的东西。
HTML页面和JavaScript无法访问客户端窗口设置或客户端文件系统。
Short answer: you don't. Because of something named 'client SECURITY'.
HTML page and JavaScript don't have access to client windows setting or client file system.
这篇关于如何使用javascript从IE客户端启动Windows服务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!