In this paper, the undoped SrTiO3 (STO) and Indium doped STO (SrTi1-xInxO3: STIO) thin films were grown on Pt/Ti/SiO2/Si substrates by pulsed laser deposition with low substrate temperature. For undoped STO film, the influences of the forming processes on their resistive switching properties were studied by current and voltage controlled I-V sweeps, respectively. An obvious current controlled negative differential conductance phenomenon was found in both polarities of the electrical field. However, for low Indium doped STIO (x=0.1 ), the filament related resistance switching was observed in both the current and voltage I-V sweeps. And for high Indium doped STIO (x=0.2), a resistance switching with a reverse direction change to that in undoped STO can be obtained by a proper forming process. Based on these results, the reversible change of the Schottky like barrier at the grain boundary by the migration of oxygen vacancies were proposed to interpret the mechanism of the resistance switching.