In 1804, he became the proprietor of "Davidovich" Infantry Regiment #34, a Hungarian unit, and held this position until his death. When the War of the Third Coalition broke out, he commanded part of Archduke Charles' army in Italy. During the Battle of Caldiero on 29–31 October 1805, he led the nine infantry battalions, eight cavalry squadrons, and 26 artillery pieces of the left-wing. After the war, he served as deputy ("Adlatus") to the commanding general in Slavonia. He inspected fortresses in Serbia and received a promotion to Feldzeugmeister in 1807. In his last active command, he led a division of Hungarian insurrection militia at the Battle of Raab on 14 June 1809 during the War of the Fifth Coalition. He died on 18 February 1814 at Komárno when he was governor of that fortress.