如何使我的程序以管理员身份自动运行

如何使我的程序以管理员身份自动运行

问题描述:

大家好,

我设计了一个应自动从Windows启动的应用程序.但是,当我在Windows Vista上运行该应用程序时,该程序无法对注册表进行必要的更改以将程序设置为自动运行模式.但是,如果我手动修改注册表,它将运行.我的头疼是如何在无需人工干预的情况下修改Windows Vista注册表.

谢谢

Hi everyone,

I designed an application that should start with Windows automatically. But when I run the application on Windows Vista, the program was unable to make necessary changes to the registry to set the program in autorun mode. But if I modify the registry manually, it would run. My headache is how to modify windows vista Registry without manual intervention.

Thanks

除非您是Admin或具有Admin权限,否则您将无法运行具有Admin权限的任何程序.
Unless you are the Admin or have Admin rights, there is no way you will be able to run any program with Admin rights.


如果您的用户具有管理员级别帐户,则可以将清单添加到您的应用程序中,以自动以管理员级别运行,而用户不会看到UAC提示.阅读 [
If your user has an Adminstrator level account, you can add a manifest to your application to automatically run as the administrator level without the user seeing the UAC prompt. Read this[^] for more.