The brothers' cadetships were obtained through a friend of their father's, Sir Walter Scott, who was extremely friendly with Robert Dundas and others with a Scottish background who had been or were at the Board of Control. After undergoing training at the Military Seminary of the British East India Company at Addiscombe, then in Surrey, Francis was gazetted as an Ensign and posted to the 23rd Madras Native Infantry in 1838. He then joined the Shah's Sappers to Kabul to support Lord Auckland's campaign to set up Shah Shuja in Afghanistan. Cunningham distinguished himself as a Field Engineer, with Robert Sale at Jalalabad, during the 1st Afghan War. After the withdrawal of the forces in 1850, he was placed by Lord Ellenborough in the Mysore commission and posted in Bangalore where he stayed for the remained of his career in India. He was known for his hospitality and for maintaining a large private library. As Secretary to the Mysore Commission and a deputy to Sir Mark Cubbon, the Chief Commissioner at Bangalore he played an active role in the development of Bangalore including the Horticultural Gardens at Lalbagh, constructions including the one he built for Sir Mark Cubbon in the nearby Nandi Hills and possibly, a large bungalow called the "Balabrooie". Unfortunately, documentation on this period of Bangalore's history is sparse.