Sunroof Reprogram on 2002 Chevrolet Avalanche 1500

The Sun Roof Does not work after Les Schwab changed the battery. The drivers manuel says to reprogram it by starting the car and holding the sunroof button in the closing direction and then letting go and pressing it again, It still doesn't work.

Do you have to unplug the battery and then do it? And will unhooking the battery cause anything else not to work?