With this regiment he took part in the campaign against Piedmont being lightly wounded at Mortara and Casa St. Albono and receiving a bullet in his knee during the battle of Novara. After this campaign he was promoted to the rank of captain in infantry regiment number 45 and awarded the knights' cross of the order of Leopold. He took some holidays to recover from his wounds and traveled to Greece and through the European parts of the Ottoman Empire. At the end of the year 1856 the prince was promoted to Major in infantry regiment number 21. With this regiment he saw garrison duty in Bologna, Piacenza, Parma and Cremona in the following years. In 1857 he was promoted to Oberstleutnant again in infantry regiment number 1 being then garrisoned in Venice, Verona and Mantua. During the year 1858 he traveled to France, Great Britain and Italy.
At the outbreak of the war in 1859 he was promoted to Oberst and appointed commander of infantry regiment number 27. With this regiment he especially distinguished himself during the battles of Solferino and Magenta. His long defence of Magenta without reinforcements and his heroic bayonet attacks against much superior forces became legendary. After the campaign he was honored by the award of the Orden der Eisernen Krone 2.Klasse mit Kriegsdekoration (neck badge of the Order of the Iron Crown with war decoration and the knights' cross of the Militär Maria-Theresien Orden. Between 1860 and 1864 the regiment saw garrison duty in Graz and Vienna before the outbreak of hostilities with Denmark forced them again to war. Wilhelm Herzog von Württemberg and his regiment fought honorably at Ober-Selk and Oeversee where he received again a heavy wound to his right leg. He was promoted to Generalmajor (8th February 1864), received the commanders' cross of the order of Leopold (10th March 1864) and the Prussian order Pour le Mérite and the military merit cross of Mecklenburg-Schwerin both in April 1864.
In 1865 he was again honored, with the position of Oberstinhaber of infantry regiment number 73 and traveled extensively to France, Spain and North Africa. During the Austro-Prussian war in 1866 he lead his brigade with his usual heroism at the battles of Königgrätz, Blumenau and Pressburg. For his efforts during the campaign he received the Allerhöchste Belobende Anerkennung on the 3rd of October 1866 - which allowed him to wear the military merit medal (Signum Laudis) when it was instituted in 1890. After the war he traveled to the USA to study the battles of the civil-war and published some booklets about this topic.
On the 23rd of April 1869 he assumed the command of the 9th infantry division at Prague and was promoted to Feldmarschall-Leutnant on the 24th of October of the same year. On the 28th of January 1874 he took over the command of the 7th infantry division at Trieste and became additionally the military commander of Trieste. With this division he took part in the campaign in Bosnia in1878, forming the right wing of the engaged forces. He crossed the Save near Alt-Gradiska, advanced to Banja Luka and defeated the insurgents near Rogelje (5th August) and Jaice (7th August). When the commander of the engaged forces FZM Freiherr von Philippovic took over the command of the newly raised 2nd Army, the Herzog von Württemberg was promoted to the brevet rank of Feldzeugmeister and took over the command of the 13th Army. He used to lead his troops personally in the field often being in close combat with the enemy. His success was recognized by the award of the Orden der Eisernen Korne 1.Klasse mit Kriegsdekoration (Grand cross of the Order of the Iron Crown with war decoration) on the 19th of October 1878. By the imperial order of the 18th of November 1878 he was promoted to Commandierender General und Chef der Landesregierung in Bosnien und der Herzegowina. This made him the military and political leader in the whole occupied territories with the responsibility to bring peace to the region and to develop the backward country. In the next 2 years, using the military forces at his disposal because civil officials were slow in being made available, he reorganized the schools, built roads and railway and fought against the large number of bandits. In the autumn of 1879 he received the order to occupy a part of the Sandschak, Novibazar and his calm and prudent way of accomplishing this task was the main reason why there was no bloody actions during the creation of the garrisons in Priboj, Priepolje and Plevlje.
On 6th April 1881 FZM Wilhelm Herzog von Württemberg was transferred as commanding general to Lemberg and honored with the grand cross of the order of Leopold. After the territorial reorganization his post was named commander of the 11.Armeekorps and Kommandierender General in Lemberg. Between September 1889 and October 1891 he was the commander of the 3.Armeekorps at Graz. At his own request he was than retired and again honored by the Kaiser who awarded him the grand cross of the Hungarian order of Saint Stephen on the 18th of October 1891. His royal highness Wilhelm Herzog von Württemberg died on the 6th of November 1896 at Meran in the southern Tyrol.
Please notice that the attached photo from the 1860-1864 period which shows Oberst Wilhelm von Württenberg among his officer friends was made by the well known photographer Ludwig Angerer at Vienna. This famous and skillful photo artist portrayed himself at work in the mirror on the left rear wall with this photo!