How to disable uninstalling a computer in Windows?

To detect the absence of a user GetLastInputInfo()

, you can use.

I want to make a GetLastInputInfo()

return that I just used a keyboard / mouse all the time - since I was using the computer extensively so that whoever relied on would GetLastInputInfo()

think that I was actively using the computer.

Can I use any Windows API functions for this?

+2


a source to share


3 answers


You are looking for a function SendInput

.



+3


a source


Have you tried just moving the mouse up and down a bit ( 15px or so) using SendInput () . I can't remember only if NT6 + resets the timeout for real hardware input or not.

Other options:



+2


a source


What is this for? Do you just want to turn off the screensaver? If so, then you are probably better off looking at the SetThreadExecutionState function .

+2


a source







All Articles