ozwombat
asked on
Detect mouse cord cut
Is it possible to detect the vandalising removal of a USB mouse, as for example when the mouse cord is cut. I believe that this is impossible with a PS2 mouse, but thought that it may be possible with a USB driver.
Hmm...Interesting question. I have an idea they may do what you want with either a PS/2 or USB mouse.
You could monitor mouse movement and if the mouse doesn't move for a while (Say 1 or 2 days if you know the computer should be used every day, but I'm guessing you want to know ASAP) then maybe the mouse cord has been cut. Then have the script to update a website or something to let you know.
Of course you could have false positives with this (i.e. computer asleep, especially if you check the mouse often). This is how you do it:
Download Autoit www.autoitscript.com
There is a function called mousegetpos() which returns the present position of the mouse. You could have it check the position of the mouse once a hour say, and if it doesn't move for a defined number of hours, you could assume it's been disconnected.
Anyway, it's an idea. I don't believe there is an easy solution to your question.
You could monitor mouse movement and if the mouse doesn't move for a while (Say 1 or 2 days if you know the computer should be used every day, but I'm guessing you want to know ASAP) then maybe the mouse cord has been cut. Then have the script to update a website or something to let you know.
Of course you could have false positives with this (i.e. computer asleep, especially if you check the mouse often). This is how you do it:
Download Autoit www.autoitscript.com
There is a function called mousegetpos() which returns the present position of the mouse. You could have it check the position of the mouse once a hour say, and if it doesn't move for a defined number of hours, you could assume it's been disconnected.
Anyway, it's an idea. I don't believe there is an easy solution to your question.
ASKER
Hi TCB1
Thanks for the thoughts. I should have pointed out that the purpose of the detection is to catch vandals in the act. Detecting the mouse missing by lack of movement may however be useful for maintenance purposes, thank you.
Thanks for the thoughts. I should have pointed out that the purpose of the detection is to catch vandals in the act. Detecting the mouse missing by lack of movement may however be useful for maintenance purposes, thank you.
I have another idea about how to poll the device manager for changes. I'll let you know how it goes in the next few days.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Gary