The setup of your HP printer fails if drivers aren't installed properly. It's better to uninstall the existing driver or software during this sort of situation and re-install an updated version