Windows Media Center 应用程序和 UAC
我目前正在尝试编写一个 Windows Media Center 应用程序(Vista),它可以在启用 UAC 的情况下重新启动服务。 禁用 UAC 时一切正常,但一旦启用 UAC,我就会收到“访问被拒绝”错误。
我相信这是因为 Window Media Center 应用程序在 Windows Media Center 进程下运行,因此需要以管理员身份启动才能正常工作。 有谁知道我如何在启用 UAC 的情况下实现这一目标?
I'm currently trying to write a Windows Media Center Application (Vista) that can restart a service with UAC enabled. Everything works fine when UAC is disabled but as soon as UAC is enabled I get an Access is Denied error.
I believe this is because the Window Media Center applications are running under the Windows Media Center process and as such would need to be started as Administrator for this to work. Does anyone know how I might achieve this with UAC enabled?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
看一下这个。 听起来您需要标记该进程以请求 UAC 允许继续:
http://technet.microsoft.com/en-us/magazine/cc138019.aspx
Check this out. Sounds like you'll need to flag the process to ask UAC for permission to continue:
http://technet.microsoft.com/en-us/magazine/cc138019.aspx
将您的进程标记为需要提升。
您可以通过添加到清单
You can mark your process as needing to be elevated by adding
To the manifest.