What really work for me, but it can be uummmm very meanie way but it does work. I had one dog for 14 years, when he was young, he always get into the garbage can in the kitchen, he always find a way to get into it no matter what kind of trash can container I brought and we get very upset because of coffee ground get all over the living room carpet. So, I came up with new idea, I brought two mouse traps and gently put it in the garbage can. One day when I got home and I look in the garbage can, behold! one mouse trap missing! I look for it and found it in the dinning room and saw Sammy (dog) been licking on his left lip!! He keep on licking and licking. So I check his lip and he seem to be fine. Two month later, he never gotten into the garbage can again. Work pretty well...
Now talking about the cat.... we have cats in the past and one cat have been notorious for peeing in front of us on our bed or other bed, and we hate to keep the door closed at night, it will get heat up in our bedroom. So, again, I came up with new idea.... Yes, you got that right!!!
I brought 20 mouse traps (10 per beds) and I carefully laid out 10 mouse traps on our bed. The minute I left our bedroom and suddenly I heard a loud clack! along with loud scream!! EEEEEEEEAAARRRROOOWWW!!! and I turned around looking back to the hallway and saw Furby ran out of our bedroom as fast as the speeding bullet.
So, still left the mouse traps there... it been quiet for while. Then when we went to bed, I had to remove all the mouse traps then next morning, I put it back again. It been quiet lately...Look like Furby refuse to get back in our bed again. Even when we slept at night (I like it!! Cuz I hate the way cat do in our bed sleeping at night!!!)
Mouse trap...my savior...<grin>
Edit: I forgot to add, I modified the mouse traps I made for the cat, I added a "spacer" between the base of the trap and the clamp, with half inch opening..so that way it doesn't closed all the way. Just that I want only give a hard slap on his feet or tail or whatever and easily to release it when he takes off.