An attempted burglary near Swindon has sparked an urgent police warning to the public.