With the device plugged in, right-click Computer, click Properties > Device Manager (in the left pane) to see if the drive appears under ‘Disk drives‘. If it does, right-click it, click Properties > Policies Tab and check the box ‘Quick removal’. A USB ‘drive’ should have a check in this box. Restart the computer if you change anything. Internal hard disk drives use ‘Enable write caching on the disk’.
What is ransomware and how do I protect my PC from WannaCry?