We have used those ultrasonic stakes here as well. They will make them relocate; we use them just to keep them from making a mess of the yard. And they do make solar charged ones, too.
Sigh, my dog will catch them and eat them given half a chance. Ugh!