 Following appointment of Rear admiral John S. McCain Sr. to command of Aircraft Scouting Force, Riley remained as his Aide for several months.Following the United States entry into World War II, Riley was promoted to the rank of Lieutenant commander on January 1, 1942 and assumed duty as operations officer on the staff of Commander, Fleet Air West Coast, which was responsible for the defense of West Coast of the United States and Alaska.In late 1942, Riley was temporarily attached to the Aircraft Squadrons operating at Guadalcanal and saw combat duty against Japanese fighter planes.