Time will tell whether propping up yet another military dictator is a good idea.
I have a feeling it will come back to bite us just like Saddam, Bin Laden, Arafat, Iran-Contra, Noriega, what's-his-name in Haiti, etc, etc.
The known factors here are- Musharraf, who is not a raving fundamentalist is in control of most of Pakistan. He has nukes. Also in Pakistan and in an area that Musharraf does not control are the Taliban, al Qaeda (and bin Laden presumedly) and a population that is largely sympathetic to both and hostile towards Musharraf. The Taliban would like to gain power in Pakistan. Al Qaeda would like to get the nukes. Standing in their way is Musharraf.
These are the known factors. It's what we have to work with now. Maybe in 20 years it'll look different- but now it's the hand we've been dealt and that we're having to play.