Cook sets up victory shot against Sri Lanka