Ally McCoist's men face a trip to Airdrie to play the amateurs, whose Hampden home is being used for the Commonwealth Games.
The date is yet to be fixed as Rangers organised a friendly in Derby on the August 2 first-round date because of the Glasgow 2014 Games. They start their season with a Petrofac Training Cup tie against Hibernian on August 5.
Championship winners Dundee host Peterhead while fellow promoted side Hamilton will be at home to Arbroath.
Relegated Hearts and Hibs enter the competition in the second round.
Meanwhile, Lewis Macleod marked his comeback from illness with a 25-yard strike as Rangers beat Fulham 4-2 in a closed-doors friendly at Murray Park.
Macleod, who suffered damaged heart muscles following illness that ended his season in January, put Ally McCoist's side 2-1 up after Kenny Miller had earlier opened the scoring at Rangers' training ground.
Fulham, who were watched by new signing Ross McCormack, twice levelled through Moussa Dembele and Hugo Rodallega before second-half goals from Nicky Law and Nicky Clark handed Rangers victory.