One trick I learned: If you have the type of manager who doesn't like "No", then say "Yes", but continually keep him in the loop as the project progresses to failure.
If you're up front honest, they'll think you're being lazy - even if you have good reasons.
If you say "Yes", and then fail for all those reasons while providing regular reports, the manager views you as "Someone who is willing to do things".
They often don't care about your actual success/failure rate, but instead use your attitude as a proxy for the actual success/failure rate.
Also, as the project is moving to failure, he'll usually intercept with "OK, how about we changed the requirements to ...?"
If you asked for that change in the beginning, the same rationale as the above applies.