1. Click Start and Run. In the open box, type gpeditmsc, and then click OK to open the Group Policy window.
2. In the left pane, under Local Computer Policy, expand Computer Configuration, Management Templates and Systems, and then under the heading of Settings in the right pane, double-click to turn off autoplay.
3. Click the Settings tab, select the Enable check button, then click Turn off all drives in the autoplay box, click the OK button, and finally close the Group Policy window.