This question already has an answer here:
I am not sure whether ransomware attacked a pc in my home setup. An adware popup came up and locked the browser however i ended the process and ran my av, nothing was detected. There were usb drives connected. I reinstalled windows, however i plugged the usb drive back in to format. first i am not sure if i even got ransomware but i reinstalled to be safe, i wanted to re use the usb drive so i formatted however i am not sure if ransomeware can spread like a virus or a trojan and if i formatted the usb drive even though i plugged it back in to the pc, will there be any possible spread of possible ransomware? There is a chance this could of been adware however if the browser is locked and has to have the process ended does this indicate ransomware?