This has happened to me in the past with my HP F4580 printer and it drove me potty.
Couldn't work out what had gone wrong so I tried reinstalling the whole dang thing using the original installation disc but couldn't get to the area that allowed me to reconnect to my wifi.
In the end I just admitted defeat, deleted everything HP from my computer, and went on line and reinstalled the software and driver. Wasted 2 days trying to figure out what had gone wrong and then took 10 minutes to sort it all out the easy way.
http://h10025.www1.hp.com/ewfrf/wc/d...roduct=3944758
Just make sure you click on the link to change to your own printer as I have given the link to my F4580.