Turn off all partitions to automatically play and restore CMD batch processing for all partition AutoPlay _dos/bat

Source: Internet
Author: User
Using the method, create a new one. TXT text document, paste the following red area code in.

Then save it as a *.bat suffix or *.cmd suffix batch file format to run the use!

1. Turn off automatic playback of all partitions
Copy Code code as follows:

@ ECHO off
@ ECHO.
@ ECHO. Special Notes
@ ECHO.
@ ECHO-------------------------------------------------------------------------------
@ ECHO Now there are many kinds of viruses rely on the flash disk automatic playback function of wanton transmission, sometimes we do not guard against, broken brains, than
@ ECHO is the most popular Sunway variant! This operation will completely turn off the autoplay feature of all drives, please use it carefully!
@ ECHO-------------------------------------------------------------------------------
@ ECHO.
Echo. & Pause
Reg delete Hkcu\software\microsoft\windows\currentversion\policies\explorer/v nodrivetypeautorun/f
REG ADD hkcu\software\microsoft\windows\currentversion\policies\explorer/v nodrivetypeautorun/t reg_dword/d 255/f
Cls
Echo.
Echo.
Echo.
Echo.
Echo turns off all drives automatically play successfully!
Echo.
Echo. & Pause

2. Resume automatic playback of all partitions
Copy Code code as follows:

@ echo off
@ echo.
@ echo. special Note
@ echo.
@ echo-------------------------------------------------------------------------------
@ echo Turning off the autoplay feature of all drives may cause some inconvenience to your operation, which restores the XP default
@ ECHO AutoPlay feature, but we remind you to do a good job of preventing the virus!
@ echo-------------------------------------------------------------------------------
@ echo.
Echo. & Pause
Reg delete hkcu\software\microsoft\windows\currentversion\policies\explorer/v nodrivetypeautorun/f
Reg ADD hkcu\software\microsoft\windows\currentversion\policies\explorer/v nodrivetypeautorun/t reg_dword/d 223/f
CLS
Echo.
Echo.
Echo.
Echo.
Echo restores all drives automatically play successfully!
Echo.
Echo. & Pause

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.