当我们在Windows2008 SP2上安装我们的产品时,有几个服务无法启动。在尝试了不同的方法后,我们发现当"Log on as“设置为"Local system account”时,这些服务可以启动。
此服务需要以特定用户身份运行,因为它需要访问安全资源。在Windows2003下,该服务在这个特殊的用户帐户下运行得很好。我认为这个问题与UAC (用户访问控制)有关。
在交互模式下,用户可以通过回答安全对话框来提升权限。如何对服务执行相同的操作?如何配置服务,使其以必要的权限运行?
谢谢!
发布于 2014-01-03 11:00:41
尝试向服务应用程序的程序集清单中添加项。包括requireAdministrator requestedExecutionLevel
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0" processorArchitecture="X86" name="client" type="win32"/>
<description>Westwell Contoso</description>
<!-- Disable file and registry virtualization -->
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="requireAdministrator" uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>
大多数人以受限的LocalService或NetworkService帐户运行他们的服务。
https://stackoverflow.com/questions/2376157
复制相似问题