How can I set sound to mute by default, but automatically "un-mute" when I plug in headphones in Windows 7?

Solution 1:

If you make separate settings for headphone volume and speaker volume, you can set the speakers to zero volume. That would effectively give you mute when headphones are not plugged in.

This capability is dependent on your hardware and sound card drivers. Here's a useful post on this subject from a Windows 7 forum. You'll need to explore your sound card configuration to see if it's possible.