  We consider an extension of the Standard Model, where the difference between
the baryon number $B$ and the lepton number $L$ is gauged with an Abelian gauge
field, in order to explain the exact conservation of $B-L$. To avoid a gauge
anomaly, we add a right-handed neutrino $\nu_{\rm R}$ to each fermion
generation. Here it is not sterile, so the usual Majorana term is excluded by
gauge invariance. We provide a mass term for $\nu_{\rm R}$ by adding a
non-standard 1-component Higgs field, thus arriving at a consistent extension
of the Standard Model, where the conservation of $B-L$ is natural, with a
modest number of additional fields. We study the possible formation of cosmic
strings by solving the coupled field equations of the two Higgs fields and the
non-standard U(1) gauge field. Numerical methods provide the corresponding
string profiles, depending on the Higgs winding numbers, such that the
appropriate boundary conditions in the string center and far from it are
fulfilled.
