How to set a Pendrive as readonly?By selva / November 29, 2016 In order to avoid virus attack to your pen drive. kindly set your pen drive as read only. Open cmd in administrator mode then run the following commands.