I'm wondering if a non-Jew simply does the hammering, whether the mezuzah will still be considered kosher so long as the proper blessing is said.
This video (after 1'30") reports a similar question was asked to R Yosef Shalom Eliashiv who brought a Maharam Shick that it was allowed for a non-Jew to put up a mezuza if a person is old/sick and can't do it himself. He argues the mitzva is to have a mezuza not to put it on.
However, others (the Sdei Chemed, R Shmuel Wosner) argue that putting up the mezuza has to be lishma, for its own sake, which only a Jew can do.
Since it is a dispute, the specific details of the case (e.g., the reason a Jew cannot hang it to start with, whether that Jew would be able to finish the hanging if a non-Jew helps) will be crucial and one should ask a rabbi.
A non-Jew should not put up a Mezuzah. If it was already put up by a non-Jew, most authorities rule that it should be taken down and reattached by a Jew. There is a question if a new blessing should be made [and therefore one would not make the blessing]. (שערי המזוזה טז/ ג הערה ו writes at length about this question.) ]