If the US would attack Pakistan, sure they could win the war, but at what cost?
They would do more than shooting themselves in the foot. That is exactly why they will never go to war with Pakistan.
US sanctions would be more powerful than fighting the war because Pakistan is too much dependent on US from loans to weapons. Even the IMF, World Bank is controlled by US vote. (yesterday WB approved $1.8 Billion loan for Pakistan.)