Trao đổi với tôi

http://www.buidao.com

1/1/10

[System Info] How to make a Autorun

Hey every1 I want to post this up although I do want to say it is not mine but it is useful.
Code:
[autorun]
ICON=icons.dll,x
LABEL=Testing12345
OPEN=SETUP.EXE
SHELLEXECUTE="EULA.txt"

UseAutoPlay=1

shell\configure\command=SETUP.EXE
shell\configure=&Configure...

shell\install\command=SETUP.EXE
shell\install=&Install...

[Content]
MusicFiles=0
PictureFiles=0
VideoFiles=0

[ExclusiveContentPaths]
\boot
\boot\boot screens
boot

[IgnoreContentPaths]
\boot
\boot\boot screens
boot
Explanations:

ICON= path leading to any file containing an icon, can be .exe, .dll or .ico, if the file contains multiple icons, you must define the index of the icon like icons.dll,1

LABEL= override the internal disc name made when burning or creating an image, can be up to 32 characters long including spaces

OPEN= path leading to an .exe file to run when the disc is inserted/image mounted, if it is inside a folder enter it like this "foldername\filename.exe" (without quotes)

SHELLEXECUTE= Data file or executable to run when the disc is inserted, this works much like OPEN does, but it allows you to use the end-users file associations to load files, so if you call a .txt file (as i did above) it will open in their default program they have set for .txt files
this can also be ran as a program with a parameter, such as "notepad.exe EULA.txt" if you want to override the users default file handling associations

shell\configure\command=SETUP.EXE
shell\configure=&Configure...

these options allow you to add selections to the right click menu when the disc is inserted the shell\{word} defines what word you use, unless you use the second option \shell\{word}=&Register

this second option allows you to leave the {word} only associated "internally" where the command= has the same word before it, and the =&Register is what is displayed, also the '&' goes before the shortcut letter you want in the right click menu (for those that use the keyboard this is helpful)
the command allows for parameters as well

[Content]
MusicFiles=
PictureFiles=
VideoFiles=

this allows you to manually define what content is on the cd/dvd/image when you use windows' autoplay feature (the dialog that we all hate ) you use the following (0,f,false,n,no) or (1,t,true,y,yes) for the options, and they are case-InSenSITive and will cause AutoPlay to disregard any other content on the media

UseAutoPlay= this option should NEVER be used, that's my opinion anyway, if you set this to 1 it will disregard all OPEN, shellexecute options you previously set and default to the AutoPlay dialog (which you can customize, but still, it's not worth it)

[ExclusiveContentPaths]
[IgnoreContentPaths]

these two options are to define where TO look and where NOT TO look when using the AutoPlay feature, you can use leading \ or not, do not use "" when there are spaces, as they are included as part of the path
Enjoy!

RefLink: http://www.team-axvis.net/forum/showthread.php?tid=81