Conducting polyaniline thin films were in situ deposited on silane-modified substrates through chemical polymerization. The resulting polymer films show good order and adhesion on the substrates. The thickness and conductivity of the resulting films can be tuned with the preparation conditions. The room temperature conductivity for the film with 1 mu m thickness is 0.5 S/cm, which is close to that of a compressed pellet of emeraldine salt.