He also attended the Mounted Service School at Fort Riley, and after graduation he was assigned as the school's secretary. Danford was promoted to first lieutenant in 1907. While serving in the Philippines in 1908, Danford assisted Edmund L. Gruber in authoring the lyrics to "The Caisson Song", which was later adapted into the "U.S. Field Artillery March" and then "The Army Goes Rolling Along". In 1910, Danford was assigned as aide-de-camp to Brigadier General Frederick K. Ward, the commander of Fort Riley and commandant of the Mounted Service School. In 1911, Danford was assigned to the Army's remount depot near Lexington, Kentucky to undertake a study of horses and horse breeding, with the goal of determining the best methods for the Army to procure and employ the horses it needed for artillery, cavalry, transportation, and supply activities. He commanded a battery at Fort Sill, Oklahoma from 1912 to 1914, including service on the Arizona-Mexico border during the Border War that took place during the Mexican Revolution. From 1914 to 1915 Danford was an instructor at the Army's Field Artillery School. Danford was based at Yale University in New Haven, Connecticut from 1915 to 1917, and served as senior instructor and inspector of the Connecticut National Guard. During this assignment, Danford was promoted to major, lieutenant colonel, and colonel in the National Guard and assigned to command Connecticut's 10th Field Artillery Regiment. He was promoted to captain in the Army in 1916. In 1916, the 10th Field Artillery was activated for federal service in World War I, and Danford commanded the regiment during its initial training at Tobyhanna Army Depot. From February to July 1917, Danford was assigned as assistant professor of military science at Yale University, and served as the mustering officer for members of the Connecticut National Guard as they entered federal service. While at Yale, Danford co-authored "Notes on Training Field Artillery Details", a practical manual for teaching field artillery tactics and techniques. It quickly became the Army's standard reference work for training field artillery soldiers, and went through numerous printings during and after World War I. In July 1917, Danford served as mustering officer for members of the Pennsylvania National Guard, after which he traveled to Fort Sill, where he served as an artillery instructor. Originally slated to join the 42nd Division, in August, he was instead assigned to the 302nd Field Artillery, a unit of the 76th Division. He trained with the regiment at Camp Devens, Massachusetts, after which he was assigned to Plattsburgh Barracks, New York as senior instructor of field artillery for the Army's second wartime Officers' Training Camp.