Hasn't always worked for me though.
One of my 2 cats (both neutered males) had taken to painting all of my walls, furniture, and anything else he could reach. I was horrified when I got a UV light. He never did that in all of the 9 years I've had him and didn't when I got him a buddy (they love each other and did so right away) but when a strange black cat started showing up outside both of my cats went nuts and the older one (9) started his wall painting, as well as the curtains out in the kitty room. I couldn't keep up with it.
My cats are indoor cats so it's not like the stray is actually going to get in here but they both hate him (and he is weird...my neighbor's cats hate him too). I've tried cleaning with a pet urine enzyme and then spraying some "No More Spraying" but that hasn't worked. He's a sneaky little bugger too; he waits until he thinks I'm not looking and then does it. He's learned that the minute I see him backing his butt up to something he gets yelled at.
It wasn't until I found "Cat Spraying No More" that I was able to finally get rid of this tiresome behavior.
Now my house doesn't smell like a litter box anymore :)
Here's a link the their site if you're interested in checking it out.
I hope you guys don't mind me sharing this. Have a wonderful day!