没有管理员权限的安装服务

没有管理员权限的安装服务

本文介绍了没有管理员权限的安装服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

昨天,我在Visual Studio上使用WindowsService项目选项,尝试安装我的服务时遇到了错误,经过几次尝试后,我终于想到我可能需要管理员权限才能安装服务.当我切换到以管理员身份运行"时,它确实已安装.但是让我想到的是,其他程序(例如PunkBuster,AMD驱动程序,Adobe Acrobat Update Service,Filezilla Server FTP等)如何能够通过简单地运行可执行文件而不显示任何内容来安装服务.什么样的窗口可以请求管理员权限?我的意思是,如果我真的愿意,我将如何使用我创建的应用程序执行相同的操作?

Yesterday I was playing with the WindowsService project option on Visual Studio and when trying to install my service I was facing errors, after a few tries it finally occurred to me that I would probably need admin rights to install a service. And it did install when I switched to "Run as Administrator". But what it got me thinking, is that, how are other programs, like PunkBuster, AMD Drivers, Adobe Acrobat Update Service, Filezilla Server FTP... and so on, capable of installing a service by simply running an executable and not showing any kind of window to request admin rights? I mean, if I really wanted to, how would I go about doing the same with an application created by me?

推荐答案

这不是您想要听到的答案,但是它是答案:那是不可能的.您确实需要管理员权限才能安装Windows服务,并且无法解决此问题.

This is not the answer you want to hear, nonetheless it is the answer:That's not possible. You do need admin rights to install Windows services, and there is no way around this.

您提到的其他程序很可能已经获得了管理员权限(如启动时要求的),或者在运行时要求用户提供这些权限.

The other programs you mentioned most likely got the admin rights already (like requested it when started) or asked the user for these rights at runtime.

这篇关于没有管理员权限的安装服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-13 12:03