Using first-principles density functional theory based method we have performed a systematic investigations of the electronic structures, the structural and magnetic properties related to shape memory applications for Mn2NiAl,Mn2NiGa,Mn2NiSn and Mn2NiIn alloys. Our results confirm that all the alloys undergo a volume conserving martensitic transformation at low temperatures and that the low temperature stable phase is a non-modulated tetragonal one. The relative stabilities of the martensitic phases and the magnetic properties differ considerably for Mn2NiAl, Mn2NiGa and Mn2NiIn and Mn2NiSn. Details of the electronic structures suggest that the differences in hybridizations between the magnetic components are responsible for these trends. Quantitative estimates of the energetics and the magnetizations indicate that Mn2NiGa and Mn2NiAl are more promising candidates for shape memory applications.