China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-07-07 04:53
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Please provide the specific content in Chinese that needs to be translated. As the current input is just the request "求高手讲下autorun.ini&autorun.inf的用法", I need the actual Chinese text that is to be translated. Please provide the full Chinese text content for translation. View 1,925 Replies 5
Original Poster Posted 2008-03-14 23:55 ·  中国 广东 韶关 电信
初级用户
Credits 114
Posts 36
Joined 2007-12-22 17:42
18-year member
UID 106486
Gender Male
Status Offline
I've been attracted by this question for a long time. I searched on the Internet, but the explanations are not detailed enough, so please tell me if you know, thanks!
Floor 2 Posted 2008-03-15 07:21 ·  中国 上海 联通
版主
★★★★★
Credits 9,023
Posts 5,017
Joined 2007-05-31 19:39
19-year member
UID 89899
Gender Male
Status Offline
The content you provided is mostly in Chinese and has been translated as follows:

### Online search results (I don't know which part the original poster didn't understand)

I. First recognize Autorun.inf
The main function of Autorun.inf is to control the automatic startup of the CD drive (everyone knows this). Just open any Autorun.inf and you can see the following content

(Notify the system that this is a standard AutoRun file and needs to execute the following commands.)
OPEN=*****.EXE (Control to automatically open the *****.EXE program)   
ICON=****.ICO (Change the CD icon to ***.ico)

II. Make a CD that automatically opens a web page
1. Put your web page in a folder, such as html
2. Create a new autorun.inf file in the directory, and after opening, edit it to the following content:


icon=***.ico (Add icon)
shellexecute=index.html (Automatically open index.html when the CD is inserted. If it is win9x/me, change it to open=start.exe index.html)

3. Burn

III. Make a CD that automatically plays music
1. First, create a new folder to place the MP3s to be played. I put it on drive D, that is, d:\mp3
2. Download a player software. Note that it should be green (such as Qianqian, Foobar)
3. Set the player, remove unnecessary functions. The most important thing is to add the music in D:\MP3 to the play list and save it as an fpl play list file (this won't be detailed here)
4. Create a new file named autorun.inf in the MP3 directory, open it with Notepad, and enter the following content!


open=foobar\foobar.exe **.fpl (That is, open the **.fpl play list through foobar)
icon=foobar\foobar.exe,1 (Set the icon to the first icon of the foobar program)

5. Burn all the files in D:\MP3 to the CD, done!

IV. Change the icon of the drive
1. Create an autorun.inf in the root directory of the drive whose icon you want to change (take drive D as an example, that is, create it under drive D)
2. Enter the following content:


ICON=c:\windows\system\shell32.dll,21 (The icon of drive D will become the 21st icon of shell32.dll)

V. Add a right-click menu to the CD
1. Create an autorun.inf in the root directory of the CD and edit it to


icon=c:\windows\system\shell32.dll,21 (I won't talk about this)
shell\01=Instruction file
shell\01\command=notepad readme.txt (Open readme.txt file with notepad)
shell\02=Automatically run the CD
shell\02\command=autorun (Automatically run the CD)
shell\03=Install WINRAR
shell\03\command=winrar.exe (Install WINRAR)
open=***.exe (Run this program when the CD is automatically run)

It will take effect only after burning. I don't know if it's a problem with my machine. Depressed!

VI. Use autorun.inf to modify the registry
Example 1. Insert the CD and automatically lock your registry...
First, write a REG file. Open Notepad and type the following content:

REGEDIT4


"DisableRegistryTools"=dword: 00000001

Save the above part as a lock.reg file. It is particularly important that the first line REGEDIT4 should be in uppercase and written at the top. There should be a blank line after it. After the last line is written, remember to press the Enter key twice, that is, there should also be a blank line at the end. Then create a new AutoRun.inf file and enter the following content:  


Open=Regedit/s ShareC.reg   

The /s parameter is to import without displaying any prompt information. Save the AutoRun.inf file. Copy both the lock.reg and AutoRun.inf files to the root directory of another computer's disk or burn them to a CD. Then the other party only needs to double-click that disk or insert the CD into the CD drive to import lock.reg into the registry, and there is no prompt. Oh, the other party's registry is locked
PS: You can use this function to do some... behaviors, I won't say the details... Hehe

Explanation 1: Whether the AutoRun function is executed is actually determined by the registry. Enter Regedit in the "Run" in the "Start" menu, open the registry editor, expand to the HKEY_CURRENT_USER\
Software\Microsoft\Windows\Current- Version\Policies\Exploer key, and the binary value "NoDriveType- AutoRun" on the right window determines whether the AutoRun function is executed (including the hard disk and Ramdisk).
The default key value of "NoDriveTypeAutoRun" is 95 00 00 00

Explanation 2: Shell32.DLL is a Windows system file, which contains many system icons of Windows. 21 means to display the icon with the number 21. Of course, you can also make your own icon. You only need to modify the path accordingly in the "ICON" line. In addition to using the icons in the DLL file, you can also use the icons in the EXE file or directly use the ICO file.

During the use of Windows XP, by default, once a removable disk is connected to the computer (insert the CD into the CD drive, or plug in a USB flash drive, mobile hard disk), the automatic playback function of Windows XP reads the drive, and after completion, a dialog box is displayed at the same time, requiring you to choose whether to open the video, audio, and picture files in it. This automatic function may be what you don't need. If you want to close it, you can use the following methods:

I. Set the properties for the removable device.
  To close the "automatic playback" function of a single mobile storage device, you can directly close this function through the property page of the mobile storage device. (This requires that the mobile storage device already exists on the computer.)
  1. Right-click the mobile storage device for which you need to close the automatic playback function in My Computer or Windows Explorer. Select Properties.
  2. In the opened window, click the "AutoPlay" tab. In the operation box, select the radio button in front of "Select an operation to perform", then select "Do nothing". Finally, click "OK".
  In this way, the device will no longer automatically open the folder.
II. Use the group policy to close the automatic playback function of Windows XP all at once:
  If you want to disable the automatic playback function of Windows XP all at once, you can use the group policy.
  1. Click "Start" and select "Run", type "gpedit.msc", and run to open the "Group Policy" window;
  2. Under "Local Computer Policy" in the left column, open "Computer Configuration_Administrative Templates_System", then under the "Settings" title in the right column, double-click "Turn off AutoPlay";
  3. Select the "Settings" tab, check the "Enabled" check box, then select "All drives" in the "Turn off AutoPlay" box, click the "OK" button, and exit the "Group Policy" window.
  You can also customize this "Turn off AutoPlay" in "User Configuration". But the settings in "Computer Configuration" have a wider range than those in "User Configuration". It is helpful for multiple users to use such settings.
  Reminder: The "Turn off AutoPlay" setting can only make the system no longer list the directories of CDs and removable storage, and cannot prevent the automatic playback of music CD discs. To prevent the automatic playback of music CDs, you can only change the properties of the mobile device.
Floor 3 Posted 2008-03-15 07:23 ·  中国 上海 联通
版主
★★★★★
Credits 9,023
Posts 5,017
Joined 2007-05-31 19:39
19-year member
UID 89899
Gender Male
Status Offline
Batch Command bat and com Formats
@echo off Start
echo Display content Custom task display
echo. & pause End
Virtual disk subst target directory virtual disk name
if not exist file path scheduled execution command cannot activate a file execution command
start path\file name.exe can use relative path to start software in specified location
call command execute command
echo. blank line
echo Display content display scheduled content
title title name set window title
pause display Press any key to continue……
exit exit command line window
start /wait program name\program installation file name installation parameters
-s automatic installation applicable to Install Shield
f2/"path\installation log name.log" set installation log applicable after -s parameter
/q automatic installation applicable to Windows Install
/qn automatic installation applicable to Windows Install
/qn+ automatic installation applicable to Windows Install display confirmation dialog after ending
REBOOT=Suppress prohibit system restart prompt applicable after /qn parameter
REBOOT=ReallySuppress prohibit system restart applicable after /qn parameter
/SILENT automatic installation display installation progress applicable to Inno Setup
/VERYSILENT automatic installation do not display installation progress applicable to Inno Setup
/NORESTART prohibit system restart applicable after /SILENT parameter
/DIR="x:\dirname" set installation path applicable after /SILENT parameter
/S automatic installation applicable to Nullsoft SuperPiMP Install System
/D set installation path applicable after /S parameter
/s automatic installation applicable to WISE Installer
/d set installation path applicable after /s parameter
/noreboot prohibit system restart applicable after /s parameter
/x decompression path extract software directly to folder
Regedit file name.reg/s; import registry
regsvr file name.dll/s; register COM component
RUNDLL32.EXE SETUPAPI.DLL,InstallHinfSectionDefaultInstall 128.\file name.inf install inf file
Move path new path rename
del path delete
CD path open command
Md path create directory
C:\Windows\regedit.exe /s path/registry file name.reg import registry file without prompt

INI Format

IconFile=path and file name.ico
IconIndex=0
SourceIcon=path and file name
ConfirmFileOp=0

IconArea_Image=folder picture background file name.bmp
IconArea_text=font color 0x00888888

INF Format Device Information File

open=file name.exe open=ShelExec.exe web page name.htm
icon=file name.ico
shell\mark=content displayed when right-clicking mouse
shell\mark\command\=program or command data file
Open=regedit/s registry type file name.reg add /s parameter to not display any information when importing










Signature="$WINNT$"

AddReg=file name_AddReg add registry information
DelReg=file name_DelReg delete registry information


first item abbreviation,"subsequent path","key name",class,"value"
first item abbreviation - HKEY_LOCAL_MACHINE use HKLM instead.
Path - path use \ separator.
Class - REG_SZ use 0, REG_DWORDW use 65537, REG_BINARY use 1.
Value - if relative path is needed in value, use "%01%" instead of its absolute path.

Write like this

shell\New window open(&W)\command=explorer %1

"explorer %1" can be replaced with the program to run
open=This section is only useful for CDs in XP, and my method is needed for local hard drives

Viruses also use the shell command to run

Enter Regedit in "Run" in the "Start" menu, open the Registry Editor, expand to the HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer key, find "NoDriveTypeAutoRun" in the right pane, and this key determines whether to execute the AutoRun function of CDROM or hard drive.

Double-click "NoDriveTypeAutoRun", in the default state (that is, you have not prohibited the AutoRun function), 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 prohibited automatically running devices.

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: Device Name Which Bit Value Device Name Meaning DKIVE_UNKNOWN 0101h unrecognizable device type DRIVE_NO_ROOT_DIR 1002h drive without root directory DRIVE_REMOVABLE 2104h removable drive DRIVE_FIXED 3008h fixed drive DRIVE_REMOTE 4110h network drive DRIVE_CDROM 5020h CD-ROM DRIVE_RAMDISK 6040h RAM disk RESERVED 7180h unspecified drive type

In the above list, a value of "0" means the device runs, and a value of "1" means the device does not run (by default, Windows prohibits automatic running of devices with values 80h, 10h, 4h, 01h, and these values add up to 95h in hexadecimal, so the default key value of "NoDriveTypeAutoRun" is 95, 00, 00, 00). It can be seen from the above analysis that in the default case, the devices that will automatically run are DRIVE_NO_ROOT_DIR, DRIVE_FIXED, DRIVE_CDROM, DRIVE_RAMDISK, which are 4 reserved devices. So to prohibit the hard drive from automatically running the AutoRun.inf file, you must set the value of DRIVE_FIXED to 1, because DRIVE_FIXED represents the fixed drive, that is, the hard drive. In this way, the original 100101 01 (viewed 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 turn off the hard drive's AutoRun function. How to prohibit the CDROM AutoRun function? Actually, it is to set DRIVE_CDROM to 1, so that the first value in the "No Drive TypeAutoRun" key value becomes 10110101, which is hexadecimal B5. After changing the first value to B5, close the Registry Editor, and restart the computer to turn off the CDROM's Autorun function. If you only want to prohibit the AutoRun function of the software CD but keep 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 drive or CDROM, you can perform the reverse operation.

In fact, most hard drive root directories do not need the AutoRun.inf file to run programs, so we can completely turn off the hard drive's AutoRun function. In this way, even if there is an AutoRun.inf file in the hard drive root directory, Windows will not run the program specified in it, thereby achieving the purpose of preventing hackers from using the AutoRun.inf file to invade.
Floor 4 Posted 2008-03-15 22:06 ·  中国 广东 韶关 电信
初级用户
Credits 114
Posts 36
Joined 2007-12-22 17:42
18-year member
UID 106486
Gender Male
Status Offline
Thanks! This brother is really enthusiastic!

You can create your own personalized mobile phone TF card...

[ Last edited by zcnvnv on 2008-3-15 at 11:49 PM ]
Floor 5 Posted 2008-03-16 10:35 ·  中国 香港
初级用户
Credits 35
Posts 18
Joined 2006-09-08 11:37
19-year member
UID 62142
Gender Male
Status Offline
Thank you very much! Support ah~~~~!!!!!
Floor 6 Posted 2008-12-02 16:32 ·  中国 广东 广州 花都区 电信
中级用户
★★
Credits 233
Posts 117
Joined 2007-11-28 02:38
18-year member
UID 104005
Gender Male
Status Offline
Detailed, thank you. Study hard
Forum Jump: