The adsorption of methyl and butyl-trimethoxysilane onto iron surfaces from the gas phase at different humidity levels has been investigated in situ with a quartz-crystal micro-balance and with ATR-IR spectroscopy. The thickness of the resulting siloxan polymer depends on the humidity during the film preparation. The polymer coating inhibits the corrosion of iron in an SO2-containing atmosphere.