Home > Software engineering >  Novice [help] why global hotkeys failure
Novice [help] why global hotkeys failure

Time:09-27

I use RegisterHotKey function to register the system hotkey, and in the open another program to the administrator to run the system hotkey doesn't work, and when the normal mode to turn on the program with the system hotkey, is this why?

CodePudding user response:

To administrator to run and your current normal mode is actually two user session, the environment Settings (including hotkey) is independent,
Before WinXP is can't see the other session window,
For administrators run though is the administrator of the session window shows the current desktop, but the environment Settings or administrator, if with the current environment Settings, this function still have what use?

CodePudding user response:

Boss, I am a novice, I want to achieve by hotkey to replicate data to the clipboard and paste operation, and the program must be run in administrator mode, hot keys don't work, now XKNHMT how to implement?

CodePudding user response:

Never done a similar scene, can give some advice:
First you determine the administrator mode and normal mode if the clipboard is the same? First click on the button with test, whether you need your function in two modes share the clipboard?
Then please make sure that the two modes of ProcessIdToSessionId to session ID should be different, it may be in two modes, respectively, to run a program, and then all registered hotkey, can response the hotkeys such two modes,
  • Related