I have an application I am running as a service in windows 7. I am trying to lock the mouse and keyboard and am struggling. If I run my program as an application I can simply use the JNI or call the blockinput() from the user32.dll however when I use a wrapper to run my application as a service the application runs as the system user so all the calls do not affect the current logged in user.