This is an extract from a website called "The Wardrobe" I found online. Its my belief that William initially joined the Wiltshire Militia and later joined the 2nd Batallion of Foot when, as you say, more troops were needed in the Napoleonic Wars.
"A second battalion of the 62nd was formed in 1799. Both battalions were ordered to Holland, but the British forces there returned home before this could be put into effect. The second battalion was disbanded in 1802.
In 1803, Napoleon threatened invasion with his army encamped at Boulogne, as a result of which recruits flocked to enlist and the 2nd/62nd was re-formed at Devizes in 1804. After serving in the Channel Islands the Battalion joined Wellington’s army in the Peninsula in 1813 and was involved in many of the battles which are now household names. In this campaign it earned the Battle Honours of 'Peninsula' and 'Nive' though neither were awarded until some years later. Following Napoleon's abdication in 1814 the 2nd Battalion went back to Ireland. It rejoined Wellington's army the following year, after Napoleon's escape from Elba, but arrived too late to take part in the Battle of Waterloo. "