Al/ZnO/Al thin films are prepared on the glass substrates by dc magnetron sputtering and annealed in vacuum and atmosphere, separately. The crystal structures are analyzed by X-ray diffraction (XRD), and the magnetic properties are measured by a Physical Properties Measurement System (PPMS) with a magnetic field parallel to the films plane. The XRD results indicate that the microstructures of thin films are greatly influenced by the annealing aura. In this paper, an improved corrected method to subtract the signal of the substrate is suggested. Simultaneously, the maximum fitting error of substrate is calculated, and the magnetic properties of the modified films are discussed. The results show that the room temperature ferromagnetism may be related to the charge transfer between Al and Zn and the variational position of Al in ZnO films in different annealing conditions.