Let [Formula: see text] be the direct product of a generalized extraspecial [Formula: see text]-group and finitely many copies of [Formula: see text], where [Formula: see text] is a set of primes. It is proved that every polynomial automorphism of [Formula: see text] is an inner automorphism. As an application of this result, the structure of the group generated by all polynomial automorphisms of an extension of [Formula: see text] by a direct sum of finitely many copies of [Formula: see text] is determined.