Welcome Sarita to the windows 7 forums.
When you say you connected the printer via a cable wire. Did you mean via a USB cable?
Also, did you download from HP the proper
drivers for you version of windows 7? ie 64 bit windows 7
Also, many times, before you connect any usb printer, you should install the proper software
and then when It asks you, then plug in the printer and turn it on.
This usually installs the printer correctly.
Rich