Alfred has (IMHO) hit the nail squarely on the head. This 'war' was lost when it was decided that there was a uniquely military solution to preventing AQ and a host of other loosely affiliated organisations using Afghanistan as a training facility and power base.
Other than numerous tactical victories eventually equalling a strategic one (which they don't) I have never been entirely sure what our strategy has been in Afghanistan - which is disappointing given that I have some experience of the place.