Chromium nitride and chromium oxynitride thin films were successfully deposited onto carbon, silicon and low carbon steel substrates by DC reactive magnetron sputtering using a chromium metallic target. Argon-nitrogen and argon-air mixtures were used as reactive gases to deposit CrN and CrxNyOz films, respectively. The total flow (argon + reactive gas) was kept constant during all deposition processes. Relative humidity of air (water vapour pressure) was systematically changed from 0 to 90 % RH. Behaviour of the cathode was studied as a function of reactive gas flow and water vapour pressure. Evolution of the deposition rate and composition of the deposited films with increasing of reactive gas flow and amount of water vapour injected into the process was studied by Rutherford Backscattering Spectroscopy (RBS) and Resonant Nuclear Reaction Analysis (RNRA). The chemical bond was determined by Energy Electron Induced X-ray Spectroscopy (LEEIXS) and X-ray Photoemission spectroscopy (XPS). Hydrogen and nitrogen profiles were determined by RNRA. RBS and LEEIXS results have shown that in metallic mode, the composition can be fitted by CrN and Cr2O3 stoichiometries, but in compound mode the CrO2 stoichiometry predominates. XPS results have shown the coexistence of another phase with (CrO2)3N stoichiometry. Its proportion depends on the N content in thin films.