You can try putting cayenne pepper on & around your car, maybe mixed with a little water so it doesn't blow away. That's supposed to work well to keep animals out of a garden or flowerbed
There are motion activated air sprayers like this PetSafe Ssscat Cat Spray Control System that should be great to put by your wipers or wherever area of the car that's visited most.
There used to be a model that would beep first, and then spray air, so you could "train" them to avoid just the beep & use less or no air (no refills to buy). And it should be possible to attach an air compressor (set very low, maybe 10psi)
How it works:
Ssscat’s automatic spray system combines spray technology with a motion detector to protect indoor areas and objects within a one meter radius. When your pet is within the one meter radius, the system will detect their movement and send out a burst of spray in their direction. Since the spray is harmless, odorless, and stainless, you won’t have to worry about damaging either your pet or your home. Because the spray catches your cat off guard, he will turn away and learn to avoid that area.
- Adjustable motion detector angles between the detection of the motion and spray from side-to-side.
- You can also adjust the direction of the spray up and down.
- Ssscat repels cats and other small animals up to one meter away.
- The scentless spray is enough to annoy him, but your nose won’t notice.
- Ssscat can also be used for other small animals such as rabbits, dogs, and ferrets.
- Uses 4 AAA batteries (not included).
Taping it to a weighted bag should keep it from blowing away outside, something like a bean bag gps mount would be an expensive alternative to a soft bag with something in it.
I've tried this indoors and it did work well, too well in that it would go off whenever I walked too close to the sensor.
Or, just use a Glade Sense & Spray air freshener. It has a motion detector & should only spray once every 30min if it detects motion. The scent will probably keep cats & other animals away.
Or you can make a motion activated water sprayer from existing relatively cheap products, like a Raid Auto-Trigger sprayer and the above mentioned Glade sprayer.
Or use an Arduino based more versatile one (for maybe ~$45 US according to the parts page)
Parts list & code here http://www.tinkernut.com/2014/03/arduino-motion-detecting-squirt-gun/
This LifeHacker link has a good overview & links to both Youtube videos: