Also, make sure the new powersupply will physically fit into your case. Many Comnpaq's use smaller size powersupplies because of the properietary cases. If that is the case you may need to buy a new case with a powersupply.
Measure your powersupply and compare it to a Standard ATX powersupply which is about 5.9" in Length, 5.5" in Width, and 3.4" in Height.
Measure your powersupply and compare it to a Standard ATX powersupply which is about 5.9" in Length, 5.5" in Width, and 3.4" in Height.