目前,我正在尝试写一个Windows Media Center的应用程序(Vista)的启用UAC,可以重新启动服务。一切工作正常时,UAC被禁用,但只要启用UAC我得到一个访问被拒绝的错误。

我相信这是因为在Window Media Center的应用程序在Windows Media Center的过程,因此运行将需要开始作为管理员这个工作。有谁知道我怎么可能做到这一点与UAC启用?

有帮助吗?

解决方案

检查了这一点。听起来像是你将需要标志的过程要求UAC允许继续:

http://technet.microsoft.com/en-us/magazine /cc138019.aspx

其他提示

您可以标记您过程为需要通过添加升高

<?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"  name="CheckForceElevation" type="win32"/>
      <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
      <security>
         <requestedPrivileges>
            <requestedExecutionLevel level="requireAdministrator"/>
         </requestedPrivileges>
      </security>
   </trustInfo>
</assembly>

要清单。

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top