The infamous SCAMola said:
No... just no.
And the end never justifies the means.
But sometimes it does. E.G-The use of nuclear weapons on japan in ww2
This seems to me to be the standard utilitarian argument. The good of the many vs the good of the few. Would the suffering of these people with aids and the breaches of privacy and civil liberties create more happiness at removing aids than pain from what people had suffered. Probably not. It is almost impossible to predict the outcome, especially on something as large scale as this.
I personally think people who have aids have a moral resonsibility not to spread it. If you don't know you have it then it can't be helped, but if you do know and you continue to have unprotected sex then you could well be considered to be murdering the other person.