I was trying to find a solution for my Razer deathadder, I set one of the programmable buttons as play/pause, but it worked once, then stopper working. I tried scouring the forums for solutions, but didn't find anything useful. I knew it wasn't a problem with interfering programs, as I have a fairly fresh computer (mostly just Steam, Spotify and a couple of office applications for school). I found the solution for my problem on YouTube (https://www.youtube.com/watch?v=mnmLW-_F-mI), works for my mouse too.
Essentially (if the video gets taken down), windows+r, run "services.msc", double click "Human Interface Device Service", under "General" tab, there should be a "Start-up type", set it to "Automatic", then just restart your computer.