Scrolling Game Development Kit Forum
General => Off-Topic => Topic started by: billybob884 on 2006-02-08, 02:53:59 PM
-
does anyone know how to make an autorun script for cds? like i want to have the game quto-install when someone puts it in
and btw, when you make an installer, does it include the vb runtime files?
-
I believe all the neccessary files are supplied when creating an installation using NSIS, but I'm not sure, so I'll leave that question to somebody else.
As for the auto-run, it's quite simple. Create a file called "autorun.inf". In this file, enter three lines:
[autorun]
open=File.exe
icon=MyIcon.ico
where File.exe is the file you want to run (you can give the path to the file if it's in a subdirectory: "open=\Install\File.exe")
and MyIcon.ico is the icon you want to use. You can specify the same icon as the file like this: "icon=File.exe,1" where 1 is the index of the icon stored within the file (it may be 0-based, I'm not sure).
You can add more lines to add more options when right-clicking on the CD icon like this:
[autorun]
open=File.exe
icon=MyIcon.ico
shell\install = &Install
shell\install\command = install.exe
where the &Install specifies the text that you want in the menu (the & is placed before the "hotkey", i.e. the key you can press on your keyboard to access that menu item directly when the menu has focus rather than clicking on it. Looks like this: Install
And install.exe is the program that runs when it is selected.
There are other things you can do with this file, such as machine-specific auto-runs, but that's probably not necessary for you. If you want to know more, take a look here: http://autorun.moonvalley.com/autoruninf.htm (http://autorun.moonvalley.com/autoruninf.htm)
Mostly, however, you'll probably just have a simple one (most CDs do) like the first one above.
Then, when you have the autorun.inf file, place it in the root directory of your CD, and that's it.
-
Oh, and on a side note, this only works if a computer's CD auto-run is turned on (which is default, I believe). If it's off, then the menu items will still be there (Autorun, Install, etc) and it will automatically run the program when you double-click on the CD icon, but won't run automatically when the CD is put into the drive.
-
Yes, the VB runtime files are included in the installers created from the NSI scripts created from the package and deployment wizard.
-
simple enough, ill give this a try tonight, im going to burn the final compilation