We consider generalized Melvin-like solutions associated with Lie algebras of rank 4 (namely, A 4, B 4, C 4, D 4, and the exceptional algebra F 4 ) corresponding to certain internal symmetries of the solutions. The system under consideration is a static cylindrically-symmetric gravitational configuration in D dimensions in presence of four Abelian 2-forms and four scalar fields. The solution is governed by four moduli functions Hs (z) ( s = 1,..,4) of squared radial coordinate z = ρ 2 obeying four differential equations of the Toda chain type. These functions turn out to be polynomials of powers (n 1, n 2, n 3, n 4) = (4, 6, 6, 4), (8, 14, 18, 10), (7, 12, 15, 16), (6, 10, 6, 6), (22, 42, 30, 16) for Lie algebras A 4, B 4, C 4, D 4, F 4, respectively. The asymptotic behaviour for the polynomials at large distances is governed by some integer-valued 4 × 4 matrix v connected in a certain way with the inverse Cartan matrix of the Lie algebra and (in A 4 case) the matrix representing a generator of the 2-group of symmetry of the Dynkin diagram. The symmetry properties and duality identities for polynomials are obtained. We also presented 2-form flux integrals over 2-dimensional discs. © Published under licence by IOP Publishing Ltd.