Can a Windows Application installed via clickedonce set a keyboardhook and mousehook
My C# application uses Mouse and Keyboard Hooks as described here:
http://www.codeproject.com/KB/cs/globalhook.aspx
Can somebody tell me whether I will be able to install my application using "ClickOnce" as开发者_运维技巧 described here:
http://msdn.microsoft.com/en-us/library/142dbbz4(v=vs.80).aspx
I am afraid that a thing such as "setting a hook" is not covered by
Security permissions granted: "Grants only permissions necessary for the application (more safe)"
You can always set a hook, but the windows that you have access to will vary depending on the UAC level. If your application is running as a regular user, your hook will only work with other regular applications (i.e. not running as administrator). If your application is run as administrator, then your hook will work with all other applications.
According to this MSDN article, ClickOnce applications cannot be run as administrator, so that would mean your hooks will be somewhat limited, though this shouldn't be too much of a problem since most apps run in non-administrator mode. The best way to figure out would be to test the deployment yourself.
精彩评论