Solved

Detect mouse cord cut

Posted on 2009-05-03
5
422 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
The article will include the best Data Recovery Tools along with their Features, Capabilities, and their Download Links. Hope you’ll enjoy it and will choose the one as required by you.
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.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

813 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now