How could I set a global hook by a GUI without UAC prompt on Win7?
I want to set a global hook by SetWindowsHookEx. The hook is wrapped in hook.dll and is registered by a GUI window app.exe. Everything works fine on window NT/xp. But on Win7, how could I start app.exe process without UAC prompt and it can successfully load hook.dll to register gloal hook on Win7?? I use VC2005.
Any ideas are appreciate开发者_开发百科d!!
Best whishes, Kevin
Without changing the end users UAC settings (which would require either being at the keyboard or having been elevated and thus having seen a UAC prompt), there is no way to do this. This is by design. Being able to do something that the user has required a UAC prompt be presented for without the system presenting a UAC prompt would be classed as a bug by Microsoft and pretty immediately patched.
Take a read of this MSDN article.
精彩评论