Menu
Diable Windows CD / DVD AutoPlay

When you insert a CD/DVD disc into the drive, it begins playing music, running an application, or installing software automatically. This action is provided by a feature called AutoPlay. Some experienced Windows users find Autoplay annoying. For example, sometimes I don't know what's on a cd/dvd and I don't want programs executing without my express permission.

To stop Windows from automatically running a single CD/DVD disc, press and hold the [Shift] key down while inserting the disc in the drive.

AutoPlay works by polling the CD/DVD drive every few seconds to see if a disk has been inserted. If Windows finds a disc that wasn't there last time it polled that drive, it looks in the root directory of the disc for a file named autorun.inf. Autorun.inf contains the name of an application to run.

Windows attempts to detect the type of content on the disc

If no autorun.inf application is specified, Windows attempts to detect the type of content on the disc and launch the application configured for that type of content. If an application is not configured for the type of content on the disc, Windows will launch a dialog box asking what to do.

Select an action to take

In the dialog box you can select an action to take (or to take no action), and if you want this action to occur every time Windows detects that typem of content, you can set the "Always do the selected action" checkbox.

CD / DVD Drive Properties

To preset what action Windows should take for each type of content, right-click on the CD/DVD drive icon and in the menu that appears select Properties. In the drive Properties dialog box that appears, select the AutoPlay tab. In the drop-down list select each type of content and set the "Select an action to perform" radio button. Then select an action in the list.

If you're like me and don't want programs executing without your express permission, you can go though and select "Take no action" for each type of content. A better solution is to disable Autorun in the registry because that stops the CD/DVD drive polling. The script shown below will perform this task for you.

Dim WshShell, RegKey
Set WshShell = CreateObject("WScript.Shell")

RegKey = "HKLM\SYSTEM\CurrentControlSet\Services\Cdrom\Autorun"
If (WshShell.RegRead(regKey) = 1) Then
  If MsgBox("Autorun Enabled. Disable?", vbQuestion + vbYesNo, "Set Autorun") = vbYes Then
    wshShell.regWrite RegKey, 00000000, "REG_DWORD"
  End If 
Else
  If MsgBox("Autorun Disabled. Enable?", vbQuestion + vbYesNo, "Set Autorun") = vbYes Then
    wshShell.regWrite RegKey, 00000001, "REG_DWORD"
  End If 
End If

Open a new file in Windows Notepad, paste the code shown above into the file, then save the file with the name "set_autorun.vbs". When you double-click on the filename to execute the script a dialog box will appear with the Autorun status and request if you want to change it. After diabling Autorun, reboot the computer for the setting to take effect.

The standard script disclaimer: The script in this article is provided AS IS without warranty of any kind. Bucaro TecHelp disclaims all implied warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use of these scripts remains with you. To be safe, you should make a backup copy of your computers registry before using these with scripts. In no event shall Bucaro TecHelp be liable for any damages whatsoever arising out of the use of or inability to use these scripts.

After disabling Autorun, you can insert a cd/dvd in the drive and use Explore to open it's root directory and open any applications the same as you normally would.


Learn more at amazon.com

More Windows Tips:
• Remove Windows Components You Don't Need
• Associating File Types
• How to Fix a Scratched CD
• Three Ways to Force a Program to Close
• Diable Windows CD/DVD AutoPlay
• Delete Windows App Usage History
• Use Windows Key Shortcuts
• Uninstall Windows Live Messenger From Windows 7
• Windows 10 Shortcut to Turn Laptop Camera On or Off
• Create Your Own Custom Screen Saver with Windows Built-in Slideshow