Thanks for sharing your solution to this common problem. Unfortunately the correct recipe for fixing this varies from one machine to another as it depends on the hardware and the drivers. We can’t cover every case because there are so many variations on this theme, so we tend to direct users to the general information in the manual. which is to check the settings in the Windows Sound Control Panel.
So do you only have one physical audio input on the machine? On some machines such as VAIO laptops with only one audio input you do have to change the input device in Windows to make the input accept line level (the line level device to select was called “stereo mix”, but it was nothing to do with recording computer playback).
Are you saying that on XP, when you plugged in a line level source, the default device changed from mic to line-in? And on Windows 7, were you choosing the explicit line-in device in Audacity, or only the “Sound Mapper” or “Primary Sound Capture Driver”?
On Windows 7 when you plug in a device it usually does become Default device, unless something else was default when you disconnect it.
Gale