I have had this problem a lot of times.
Boot into dos mode and run 'scanreg /fix', and then restart the computer you might have to do that more then ones for the problem to go away.
If after doing it more then you think is enough then you have no choice but restore you registry to a previous known good state to do that:
boot into dos mode and type 'scanreg /restroe' a list will come up to choose from which backup you want choose the one you think is good, and then restart.
If you restore the registry all the settings entered after the backup was done will not be there including any hardware/software installations or configurations.