You can download the Windows security patch here but do take note that the security patch will only work if your computer NOT infected by wanna cry ransomware. To check whether your computer running 32bit or 64 bit please right click my computer and click properties.
Windows 7 32 bit – KB4012212_-_Win7_32bit_wannacry_patch
Windows 7 64 bit – KB4012212_-_Win7_64bit_wannacry_patch
Windows XP 32 bit – Windows_XP_SP2_32bit_wannacry_patch
Windows XP 64 bit – Windows_XP_SP2_64bit_wannacry_patch
Source:
Windows 7
Windows XP