The upstairs is wrong.
autorun.inf can not only run bat, and vbs is also okay. I have all done these tests.
re CharismA:
To achieve the automatic operation of the hard disk, please see the following article about closing the automatic operation of the hard disk, and the opposite can be realized. (Considering that no one reads the given link, it is directly pasted here)
Closing the automatic operation of the hard disk
Enter Regedit in "Run" in the "Start" menu, open the registry editor, expand to the HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Exploer key, and find "NoDriveTypeAutoRun" in the right pane. It is this key that determines whether to execute the AutoRun function of CDROM or hard disk.
Double-click "NoDriveTypeAutoRun". In the default state (that is, you have not prohibited the AutoRun function), in the pop-up window, you can see that the default key value of "NoDriveTypeAutoRun" is 95, 00, 00, 00. The first value "95" is a hexadecimal value, which is the sum of all devices prohibited from automatic operation. Converting "95" to binary is 1001 01 01, where each bit represents a device. The following values are used to represent different devices in Windows:
In the above list, the value "0" means the device runs, and the value "1" means the device does not run (by default, Windows prohibits 80h, 10h, 4h, 01h and other devices from automatic operation. These values add up to exactly 95h in hexadecimal, so the default key value of "NoDriveTypeAutoRun" is 95, 00, 00, 00).
It is not difficult to see from the above analysis that under the default circumstances, the devices that will automatically run are DRIVE_NO_ROOT_DIR, DRIVE_FIXED, DRIVE_CDROM, DRIVE_RAMDISK these 4 reserved devices. So to prohibit the hard disk from automatically running the AutoRun.inf file, you must set the value of DRIVE_FIXED to 1. This is because DRIVE_FIXED represents a fixed drive, that is, the hard disk. In this way, the original 100101 01 (looking from the bottom up in the "Value" column in the table) becomes binary 10011101, which is converted to hexadecimal as 9D. Now, change the key value of "No Drive Type AutoRun" to 9D, 00, 00, 00, close the registry editor, and restart the computer to close the AutoRun function of the hard disk.
How to prohibit the AutoRun function of the optical disc? In fact, it is to set DRIVE_CDROM to 1, so that the first value in the "No Drive TypeAutoRun" key value becomes 10110101, which is 16 hexadecimal B5. After changing the first value to B5, close the registry editor, and restart the computer to close the Autorun function of CDROM.
If you only want to prohibit the AutoRun function of the software optical disc but retain the automatic playback ability of the CD audio disc, at this time, you only need to change the key value of "No Drive Type AutoRun" to: BD, 00, 00, 00.
If you want to restore the AutoRun function of the hard disk or optical drive, you can perform the reverse operation.
In fact, most hard disk root directories do not need the AutoRun.inf file to run programs. Therefore, we can completely close the AutoRun function of the hard disk. In this way, even if there is an AutoRun.inf file in the hard disk root directory, Windows will not run the program specified in it, so as to achieve the purpose of preventing hackers from using the AutoRun.inf file to invade.
Device name
Value
Meaning of device name
DKIVE_UNKNOWN
0101h
Unidentifiable device type
DRIVE_NO_ROOT_DIR
1002h
Drive without root directory (Drive without root directory)
DRIVE_REMOVABLE
2104h
Removable drive (Removable drive)
DRIVE_FIXED
3008h
Fixed drive (Fixed drive)
DRIVE_REMOTE
4110h
Network drive (Network drive)
DRIVE_CDROM
5020h
CD-ROM (CD-ROM)
DRIVE_RAMDISK
6040h
RAM disk (RAM Disk)