Solved

Detect mouse cord cut

Posted on 2009-05-03
5
424 Views
Last Modified: 2013-12-09
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.  
0
Comment
Question by:ozwombat
  • 3
5 Comments
 
LVL 46

Expert Comment

by:tbsgadi
ID: 24289759
Not as far as I know.

Gary
0
 
LVL 10

Expert Comment

by:TCB1
ID: 24476897
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.
0
 

Author Comment

by:ozwombat
ID: 24488390
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.
0
 
LVL 10

Expert Comment

by:TCB1
ID: 24494830
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.
0
 
LVL 10

Accepted Solution

by:
TCB1 earned 500 total points
ID: 24495616
This link looks good. http://www.myitforum.com/articles/1/view.asp?id=5603

I would try to rig something up to test it out, but don't have a PC available at the moment. I'm on a mac.

This utility paired with a autoitscript or batch file could perhaps do what you want.
0

Featured Post

Connect further...control easier

With the ATEN CE624, you can now enjoy a high-quality visual experience powered by HDBaseT technology and the convenience of a single Cat6 cable to transmit uncompressed video with zero latency and multi-streaming for dual-view applications where remote access is required.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
sum28 challenge 31 115
No disk drive 17 99
Making an alias 7 101
Problem to App source 6 75
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question