What you need to do before attaching a mezuzah

Before attaching the mezuzah to the jamb, a blessing is pronounced:
BARUCH ATA ADONAI ELOGEINU MELEH AOLAM ASHER KIDESHANU BEMITSVOTAV VECIVANU LIKVOA MEZUZAH

“Blessed are You, G-d, our G-d, the Lord of the Universe, who sanctified us with his commandments and commanded us to establish a mezuzah.”
Immediately after the blessing is pronounced, the installation of the mezuzah begins. If several mezuzas are attached in a row, it is enough to pronounce the blessing once, but all the time until the last mezuzah is attached, you can not be distracted and even talk about topics unrelated to the process of installing the mezuzah. If the mezuzah was poorly secured and fell, it is attached again and a blessing is pronounced.
If the mezuzah was mistakenly attached in the wrong place, it must be removed and reattached in its proper place, pronouncing a blessing.