Context. Forming massive stars launch outflows of magnetic origin, which in fact serve as a marker for finding sites of massive star formation. However, both the theoretical and observational study of the mechanisms that intervene in the formation and propagation of such magnetically-driven outflows has been possible only until recent years. Aims. With this work, we aim to study in detail the mechanisms that drive highly collimated outflows from early stages of the formation of a massive star, and how those processes are impacted by the properties of the natal environment of the forming massive star. Methods. We perform a series of 31 simulations with the aim of building a unified theoretical picture of these mechanisms, and see how the impact of different environments alter their morphology and momentum output. The magnetohydrodynamical simulations consider also Ohmic dissipation as a nonideal effect, self-gravity, and diffusive radiation transport for thermal absorption and emission by the dust and gas. We start from a collapsing cloud core that is threaded by an initially-uniform magnetic field and which is slowly rotating. We utilize a two-dimensional axisymmetric grid in spherical coordinates. Results. In the simulations, we can clearly distinguish a fast, magneto-centrifugally launched and collimated jet (of speeds 100 km s −1 ), from a wider magnetic tower flow driven by magnetic pressure which broadens in time. We analyze in detail the acceleration of the flow, and its re-collimation by magnetic forces happening at distances of several hundreds of astronomical units. We quantify the impact of magnetic braking in the outflows, which narrows the outflow cavity for the late evolution of the system. We find that despite the non-scalability of self-gravity and the thermodynamics of the medium, our results scale with the mass of the cloud core and can in principle be used with a range of values for such mass. We observe the presence of the same jet-driving mechanisms for a wide range of assumptions on the natal environment of the massive protostar, but with changes to their morphology and mechanical feedback into larger scales over time.