The opening and closing of the sunroof glass is controlled by the sunroof control module, which is part of the sunroof motor/actuator. The sunroof control module must be reprogrammed anytime it has either been removed from the sunroof, or replaced with a new component. Refer to in Roof.