AutoPlay cho phép chọn ứng dụng mở tự động khi cắm thiết bị (USB, CD/DVD, thẻ nhớ...). AutoRun là cơ chế cũ hơn, tự chạy file autorun.inf trên phương tiện lưu trữ. Windows 7+ đã vô hiệu hóa AutoRun cho USB để chống malware.
Các cách tắt AutoPlay
1. Qua Control Panel
- Mở Control Panel\All Control Panel Items\AutoPlay.
- Tùy chỉnh hoặc tắt hoàn toàn cho từng loại phương tiện.
2. Qua Settings
Windows 11
- Settings → Bluetooth & devices → AutoPlay.
- Tắt công tắc Use AutoPlay for all media and devices.
Windows 10
- Settings → Devices → AutoPlay.
- Tắt công tắc tương tự.
3. Qua Group Policy (chỉ Windows Pro/Enterprise)
- Win+R gõ
gpedit.msc. - Đường dẫn: Computer Configuration → Administrative Templates → Windows Components → Autoplay Policies.
- Kích đúp Turn off Autoplay → chọn Enabled → trong Turn off Autoplay on chọn All drives.
- Khởi động lại máy.
4. Qua Registry Editor
- Win+R gõ
regedit. - Đến khóa:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer - Tìm giá trị DWORD NoDriveTypeAutoRun.
- Sửa giá trị thành 255 (thập phân) hoặc 0xFF (hex) để tắt AutoRun trên tất cả ổ đĩa.
- Khởi động lại máy.
Mẹo: Có thể dùng công cụ Ultimate Windows Tweaker để tắt AutoPlay một cú nhấp chuột.