It only works in single-player mode, if you try to use it for anything multiplayer the game will crash to desktop (it will do this for anything based on Cheat Engine and any of the other public trainers). Also, you do not want to enable infinite health until about the third mission in. Even though there is a "skip tutorial" option, every campaign still has the first few missions setup like a tutorial, and one of the sections requires a unit of yours to take damage and be recovered - if infinite health is on, the game can't progress because the unit never "dies", it will just sit there and require you to alt+f4 and restart the game.
*As a personal aside: I couldn't even bring myself to finish a single campaign past Space Marines in that game, because the dev team paid zero attention to even what Chaos Rising did in the story of the game, so during the Space Marine campaign in Retribution, you're working with several people who were traitors, etc and that you killed or were killed already in the base game and in Chaos Rising, which took place ten years prior to Retribution.