为什么需要管理权限的应用程序无法在 Windows 启动时自动运行(Windows 7)?
我有一个应用程序(在 windows7 上运行并需要以管理身份运行)需要在 Windows 启动时自动运行,因此我像往常一样在“HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run”下添加了一个注册表项,但是我的从谷歌搜索后,即使UAC对话框没有提示,应用程序也不会自动启动。我知道我可以使用任务计划程序来解决这个问题,但是有人可以告诉我为什么“运行”注册表方式不起作用吗?为什么UAC对话框不提示?如果您能帮忙找到一篇微软的文章来解释这个问题就更好了,先谢谢了!
I have a application(which runs on windows7 and requires run as administrative) that need to run automatically when windows starts up, so i added a registry key under "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" as usual, but my application won't startup automatically even the UAC dialog doesn't promtp, after search from google. I know i can use task scheduler to workaround this, but is there anyboday can tell me why the "run" registry way doesn't work? why the UAC dialog doesn't promtp? it is better if you can help to find a article from microsoft to explain this issue, many thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
当 Windows 启动时,没有用户可以显示 UAC 提示,因此您的进程必须暂停,直到管理用户登录。
任务计划程序是执行您想要的操作的正确方法。
When Windows starts, there is no user to show the UAC prompt to, so your process would have to be held up until an administrative user logs in.
The Task Scheduler is the right way to do what you want.
这是为了使机器在启动后尽快可用。
Microsoft 白皮书:开发在 Windows Vista 上登录时运行的应用程序
It is for making the machine usable as quick as possible after booting.
Microsoft Whitepaper: Developing Applications that Run at Logon on Windows Vista