I got one of these back in 2014. Fortunately, I was able to go to a previous Restore Point from Safe Mode and remove the ransomware.
This all depends on where the virus lives on your PC. If it can infect the master boot record, a data drive, or another machine on the network, it'll reinstall itself again, and again, and again....
Some machines, like servers, don't create Restore Points of the registry for rollbacks. At that point, you'll need a backup of the boot disk and a good program to scan the data disks to clean the virus.
Unfortunately, too many people never take the time to do a full backup regularly. Windows has a very nice backup utility now. It creates a full image of the disk/disks you select. You can later mount the image if you want to view or restore individual files or folders, or use it to restore the entire O/S or system with data.
NOTE: If you do use this utility, use a 2TB or smaller external USB drive to store the image. Larger hard disks will fail when trying to mount/restore the image. Another one of those Microsoft "features".