windows 通过命令行配置windows服务
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/708875/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Configure windows service through command line
提问by Bharani
I need to enable the "Allow service to interact with desktop"option in the service propertiesthrough command line.
How to accomplish that?
I tried the "sc"command. But I can't achieve what I need.
我需要通过命令行在服务属性中启用“允许服务与桌面交互”选项。
如何做到这一点?
我尝试了“sc”命令。但我无法实现我所需要的。
回答by Andrei Serdeliuc ?
Have you tried "sc config servicename type= interact type= own"
您是否尝试过“sc config servicename type= interact type= own”
Also: http://social.microsoft.com/Forums/en-US/vcgeneral/thread/3311c5b7-be80-466e-8d49-fc431115aea9/
另外:http: //social.microsoft.com/Forums/en-US/vcgeneral/thread/3311c5b7-be80-466e-8d49-fc431115aea9/
回答by 1800 INFORMATION
Keep in mind that this feature is pretty much going away in newer versions of windows, for example in Vista it is ignored - services are no longer allowed to interact with the desktop for security reasons
请记住,此功能在较新版本的 Windows 中几乎消失了,例如在 Vista 中它被忽略 - 出于安全原因不再允许服务与桌面交互