启动应用程序Win7 [英] Startup Application Win7

查看:75
本文介绍了启动应用程序Win7的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将VB应用程序转换为配置桌面壁纸的C#.NET 4.5。当前的VB应用程序在启动时运行而不显示UAC对话框。有没有办法让我的C#应用​​程序运行而不必弹出UAC对话框?程序在寄存器中查询有关应用程序位置的信息,并且需要在启动时为所有用户运行。我试过添加一个清单文件,但是在操作系统中这个函数是如何模糊?

I am converting a VB application to C# .NET 4.5 that configures the desktop wallpaper. The present VB app runs at startup without displaying the UAC dialog. Is there a way for my C# application to run without having to have the UAC dialog pop up? The program queries the register for information on application locations, and will need to be ran at startup for all users. I have tried adding a manifest file, but am fuzzy on how this functions within the OS?

推荐答案

请参阅我对解决方案1的评论。



也许,你应该从讨论你需要提升权限的事情开始。是否真的需要。



有关清单方法,请参阅: http://msdn.microsoft.com/en-us/library/bb756929.aspx [ ^ ]。



我不会消除UAC请求,它只会避免通过在一开始就强制执行提升权限来获得一些权限异常



如果您对UAC请求感到恼火,那么您可能不会非常了解这些想法。请阅读: http://en.wikipedia.org/wiki/User_Account_Control [ ^ ]。



这个想法不是禁用UAC(这将是一个非常糟糕的主意),而不是通过拥有UAC请求并一直响应它来使用它。真正的想法是彻底排序真正需要提升的应用程序和实用程序,以及那些应该更好地符合操作系统要求并以更合理的方式运行的应用程序和实用程序,而无需请求更多权限。特别是,您不应将文件放在错误的位置。相反,您应该使用特殊文件夹。不遵守与合法目录相关的要求是导致许可问题的最常见错误之一。请参阅我以前的回答:如何查找我的程序目录 [ ^ ]。



-SA
Please see my comments to Solution 1.

Perhaps, you should start with discussing what are you doing that would require elevated privileges. Is it really needed.

For manifest approach, please see: http://msdn.microsoft.com/en-us/library/bb756929.aspx[^].

I won't eliminate UAC request, it will just avoid some permission exception by enforcing elevated privileges in the very beginning.

If you are irritated by UAC requests, it's possible that you don't quite understand the ideas. Please read this: http://en.wikipedia.org/wiki/User_Account_Control[^].

The idea is not to disable UAC (would be a really bad idea) and not to use it by having the UAC request and responding to it all the time. The real idea is to thoroughly sort the applications and utilities which really need elevation, and those which should better comply with the OS requirements and behave in more legitimate ways, without requesting more privileges. In particular, you should not place your files in wrong places. Instead, you should use "special folders". Failure to comply with the requirements related to the right legitimate directories is one of the most common mistakes leading to permission problems. Please see my past answer: How to find my programs directory[^].

—SA


检查一些答案这里 [ ^ ]。你不能删除弹出窗口。
Check some of the answers here[^]. You cannot remove the popup.


这篇关于启动应用程序Win7的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆