To effectively disable AutoRun in Microsoft Windows, import the following registry value:
To import this value, perform the following steps:
Copy the text
Paste the text into Windows Notepad
Save the file as "autorun.reg"
Note: In certain circumstances, Notepad may automatically add a .txt extension to saved files. To ensure that the file is saved with the proper extension, select All Files in the "Save as type:" section of the "Save As" dialog.
Navigate to the file location
Double-click the file to import it into the Windows registry
Microsoft Windows can also cache the AutoRun information from mounted devices in the MountPoints2 registry key. It is recommended to restart Windows after making the registry change so that any cached mount points are reinitialized in a way that ignores the Autorun.inf file.
Alternatively, the following registry key may be deleted: