Since you mention batteries, I assume this is a wireless mouse but you
don't mention which method the mouse uses to communicate with the home
base. Also, I do not know if the OS is looking at the wireless mouse, or
the home base to determine if it is working, or the connection between
the two.
If it uses infrared communication between the mouse and the "home base"...
Is the home base receiver in a position so it can "see" the infrared
transmissions from the mouse?
Is the home base plugged into the computer properly?
The IR LED in the mouse could have failed, or the receiver (sensor) LED
may have failed in the home base.
Something may be blocking or confusing the IR signal like another IR
device.
If the unit is using Bluetooth or RF (Radio frequency)
Again, make sure the home base is properly connected to the computer
Check for interference from other sources (cordless phones, microwaves, etc)
If any of these use a USB port to connect the home base to the computer,
try changing the the USB port used. IF using a USB router or hub, try
testing without it to determine if it is at fault.
Art
If you are interested in issues surrounding e-waste,
I invite you to enter the discussion at my blog:
http://e-trashtalk.spaces.live.com/