There is paternity and custody orders.
It's unlikely that the courts will grant the name change, then, unless you can show that it is absolutely in the best interests of the child.