Although you won’t be able to write any thing on your pen drive, its still very useful in case you want something to copy from your pen drive and don’t want to get infected. This trick works only on XP SP2 and you need to have administrator privileges.
Go to Start > Run > regedit.
• Browse to HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControl
• Locate the sub-key StorageDevicePolicies. If it doesn’t exist then create it first. Create a new key under Control by right clicking on it so that you don’t create it elsewhere by mistake (as shown in the above screenshot).
• Right click in the blank area of the sub key you just created and create a new DWORD value by the name WriteProtect.
• Double-click it and set the value data as 1 (and 0 for disabling it).
• Click OK, close the Registry Editor and restart the PC
most effective method of preventing your system from getting infected is to disable autorun feature
- Browse to the following key HKEY_CURRENT_USER\Software\Microsoft\Windows\ CurrentVersion\Policies\Explorer
- Modify the value of NoDriveTypeAutoRun to df (hexadecimal)