MouseSpeed allows you to change your cursor speed in Windows via a command line app, so you can script it. I set up a couple of hotkeys in AutoHotKey so I can adjust my mouse speed depending on whether I'm using the touchpad or my bluetooth mouse.