What is the will of the (Catholic) Church when she baptizes? The Catechism of the Catholic Church says that, in an emergency, any person with the right intention can baptize. And “the intention required is to will to do what the Church does when she baptizes.” (CCC 1256)

I can’t find anywhere a clear description of what it means to will to do what the church does. Any suggestions? I would appreciate a solid reference.
What is the will of the Catholic Church when she baptizes?

The Catholic Church states the following when it comes to performing a baptism in an emergency situation:


  In case of necessity, any person can baptize provided that he have the intention of doing that which the Church does and provided that he pours water on the candidate's head while saying: "I baptize you in the name of the Father, and of the Son, and of the Holy Spirit." - Catechism of the Catholic Church (1284).


You probably will not find a truly solid reference as to what “the intention required is to will to do what the Church does when she baptizes” means.

In substance, the intention of the Church when administering the sacrament of baptism is just that. The will of the Church is to perform a valid sacramental baptism.

When about to perform a Baptism in an emergency situation, one must have the intention of baptizing someone while pouring water on the candidate's head while saying: "I baptize you in the name of the Father, and of the Son, and of the Holy Spirit." This is the will of the Church as regards to how an emergency baptism should be carried out.


  The Essential Parts
  
  You must have the intention of performing a valid baptism.
  
  For example, if children are playing church or if you perform a baptism as part of a play, or you are horsing around in a swimming pool, it is not a valid baptism.
  
  Water must be involved.
  
  Immersion is valid in all churches, but since this is an emergency, that is probably not practical. Instead, pour water on the candidate’s head three times. (This instruction goes back to the first-century document called the  Didache, or the Teaching of the Twelve Apostles.) Sprinkling the water, daubing water on the candidate’s forehead, or pouring the water only once may be valid in some churches but it won’t be valid in many others.
  
  You must use the formula in Matthew 28:19.
  
  You must say to the candidate, “I baptize you in the Name of the Father and of the Son and of the Holy Spirit.” You can add any additional wording that you like, but it’s probably best to stick to the bare essentials. If you substitute other formulas or if you baptize only in Jesus’ name, the baptism may be valid in some churches, but in most churches, it won’t be valid.
  
  How to baptize someone in an emergency 


This is the minimum that the Church requires for a baptism to be valid. This is the intention what the Church desires to be done when administering the sacrament in an emergency.


  In the case of necessity (e.g., the danger of death), the person who baptizes pours water three times over the candidate's head, or immerses the candidate three times in water, while simultaneously pronouncing the baptismal formula: "N., I baptize you in the name of the Father (the minster pours water or immerses the first time), and of the Son (the minister pours water or immerses a second time), and of the Holy Spirit (the minister pours water or immerses a third time)." A lay person who administers an emergency baptism must at least have the intention to do what the Church does when baptizing. It is also desirable that, as far as possible, one or two witnesses to the baptism be present. 
  
  When baptism has been administered neither by the pastor nor in his presence, the minister of the baptism, whoever that was, must inform the pastor of the parish in whose territory the baptism occured, so that the pastor may record it in accord with canon 877, §1and canon 878. - Administering the Sacrament of Baptism: Who, When and How


Baptism truly conveys new life in Christ, but that is the great and glorious effect of being baptized. It restores man to the friendship with God, restores grace in man's soul, destroys original sin and actual sin. But without having that intention of performing a valid sacramental baptism as intended by the Church, the affect of the sacrament would be invalid.


  Anybody—even an atheist—can administer baptism if he has the proper intention. According to the Catechism of the Catholic Church (CCC 1256) "the intention required is to will to do what the Church does when she baptizes, and to apply the Trinitarian baptismal formula." The reason anybody can baptize is that it is, in fact, Jesus Christ who performs the baptism. Once again, baptism is God’s grace to us, not our work for him. - Can only Christians administer baptism?


In the case of an emergency anyone can baptize someone. If it is truly an emergency who is going to think about the consequences of performing a baptism. It is an emergency, so make sure it is administer correctly. That is the Church's' intention. One can contemplate the effects of the sacrament at a later date.