In this study, thin films of mesoporous silica with vertically oriented and hexagonally ordered pores have been synthetized and investigated. A variety of alkyl-imidazolium ionic liquids have been used as the template, with the aim to understand how changing the chain length on the imidazolium cation from hexadecyl (C16) to dodecyl (C12) or the protic character of the imidazolium head affects the film formation and the order of the pores. In addition, different types of metal substrates have been used for the film deposition, i.e. indium titanium oxide (ITO) and gold. Complementary experimental methods, including GISAXS, Infrared spectroscopy, and cyclic voltammetry have been employed for a thorough investigation of the morphology and permeability of the deposited thin films.