HP usually ships installation disks for a $20 S&H charge.
But you should have at least burnt the recovery DVD from the recovery partition - or better even, taken an image after the initial installation. Maybe next time.
i just want to do a factory reset without affecting the things
As it looks, you do not have that option.