持续UAC升高
有什么方法可以使程序 UAC 在新实例中永久提升。我有一个在 UAC 提升模式下运行的程序,需要在 UAC 提升模式下启动一个进程,但用户不会每次都在计算机上进行授权。也许在安装过程中......但不是每次。
Is there any way that I can make a programs UAC elevation permanent across new instances. I have a program that runs in UAC elevated mode that needs to launch a process in UAC elevated mode but the user will not be at the computer to authorize each time. Maybe during installation ... but not each time.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
从提升的进程生成的进程已经被提升。您无需执行任何操作即可实现该功能。
尝试一下:
cmd.exe
。notepad.exe
。记事本将被提升,因为它是从提升的命令提示符启动的。A process spawned from an elevated process will already be elevated. There is nothing you need to do to make that work.
Try it:
cmd.exe
elevated.notepad.exe
from the command prompt. Notepad will be elevated because it started from an elevated command prompt.你可以完全禁用UAC。
更理想的做法是将以下行添加到应用程序的清单文件中:
正如 vcsjones 已经指出的那样,提升的进程将产生提升的进程,并且通过要求您的程序运行其中一个,您可以确定事情会顺利进行,而无需用户必须一直在那里。
You could just disable UAC completely.
Something more .. desirable is just adding the following line to your application's manifest file:
As vcsjones already pointed out, an elevated process wil spawn elevated proceses, and by requiring your program to run of one, you can be certain things will go alright without the user having to be there all the time.
不。如果您可以,那么每个人都会,那么UAC的整个目的就会落空。
No. If you could, then everyone would, and then the entire purpose of UAC would be defeated.