When this happened to me, on Win95, it was because the registry structure was corrupted. A "SCANREG /FIX" fixed the problem.
I have no idea if it has the same cause on XP, or how you would scan and fix the actual registry structure under an NT-based OS.