1. Go to RUN
2. Type gpedit.msc
Here under Local Computer Policy
3. Go to computer configuration
4. Go to Administrative Template
5. Go to System
6. Click on Turn off Autoplay
A new window appears(Turn off Autoplay Properties)
7. Select the option Enabled
Under that you will find Turn off Autoplay on…
8. select the option All drives
This process disables the autoplay on all drives. It is better to disable autoplay because when removable storage devices like pendrive is installed, It prevents the virus to enter into the system.