We consider generalized Melvin-like solutions associated with nonexceptional Lie algebras of rank 4 (namely, A4, B4, C4, and D4) 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 (n1,n2,n3,n4)=(4,6,6,4),(8,14,18,10),(7,12,15,16),(6,10,6,6) for Lie algebras A4, B4, C4, and D4, respectively. The asymptotic behaviour for the polynomials at large distances is governed by some integer-valued 4×4 matrix ν connected in a certain way with the inverse Cartan matrix of the Lie algebra and (in A4 case) the matrix representing a generator of the Z2-group of symmetry of the Dynkin diagram. The symmetry properties and duality identities for polynomials are obtained, as well as asymptotic relations for solutions at large distances. We also calculate 2-form flux integrals over 2-dimensional discs and corresponding Wilson loop factors over their boundaries.