Why application that require administrative privileges cannot run automatically on Windows startup(windows 7)?

时间秒杀一切 提交于 2020-01-05 08:39:15

问题


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!


回答1:


It is for making the machine usable as quick as possible after booting. Microsoft Whitepaper: Developing Applications that Run at Logon on Windows Vista




回答2:


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.



来源:https://stackoverflow.com/questions/8652246/why-application-that-require-administrative-privileges-cannot-run-automatically

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!