Try the following...
1. Go to "Control Panel".
2. Click on "Sound".
3. Make sure you are on the "Playback" tab.
4. Make sure your headphones are plugged in.
5. Now right click on the computer speakers listed on the "Playback" screen and click "Disable".
6. This should disable them only when the headphones are in. They should automatically go back to the speakers when the headphones are removed.