The Hartz Mountain Corporation is a major marketer of pet products, and one of their products has the catchy brand name No. It is essentially an aerosol spray containing chemical compounds known as ketones.
The human nose can barely smell ketones, and we find the smell to be slightly sweet. But to the extremely sensitive snoots of both cats and dogs, ketones are highly offensive. No can be sprayed on furniture, rugs or anything else that an owner wants the pet to avoid.
Incidentally, ketones are present in the breath of people who are in the advanced stages of diabetes, which explains why it was observed long ago that cats seem to avoid people who are seriously sick from diabetes.