Note that moderators should not be judges of what's correct or not. You may be right in that the option is deprecated (or missing) and the solution in the post doesn't work anymore, but that's why you can leave down votes. If moderators had to do all the dirty work of trying to prove solutions correct, we'd have no time to spend on the issues that really deserve immediate attention.
The ideal solution in such a case, of course, is to edit and correct the answer if you can.
Since our editing guidelines say that you should keep edits substantial, but not radically change the meaning of a post, we welcome any edits that correct obvious mistakes, but don't rewrite the entire answer if possible. If you suggest an edit for improvement and it gets rejected, try and see if the OP is still active so you can ask them to fix their post with your help.
You could also come to Meta when you spot a bunch of outdated and wrong answers.
If editing is not possible or would require a major rewrite of the post, you should rather downvote and comment. Explain what exactly is wrong with the post and how to possibly fix it.
Finally, you can always post a new, correct answer—just like you did in the example you gave. Unless the existing posts already accumulated tons of votes, or the wrong answer "sticks" at the top because it was accepted, this will make your post float to the top eventually once enough people voted for it.
Update in light of comments about rep loss and punishment for something that was correct at the time posted:
In the context of this Meta question, we're talking about a tool that you probably constantly update. A tool whose developers fix thousands of bugs in a year, constantly add features and remove others as they go. Most visitors who search for solutions and come to Super User will therefore see posts that simply don't work. These posts are not useful anymore.
Putting a disclaimer into these answers is possible, but what greater goal does this serve? It's bad enough that many resources on the web become outdated and nobody cares to fix them, but we have plenty of options to correct that.
If your answer becomes obsolete, why would you want to have it around in the first place? I'd be happy to be able to fix old answers of mine if they happened to become outdated due to removed features, etc. But if I can't fix them, I'll delete them, so as not to put wrong information out there, and give way for newer and better answers.
sameqon Super User.