1

Backstory I am creating a java 2d game for my year 12 major project. This project contains a section detailing that i need to package this game as if i was selling it as a commercial product, including case, manual and disc.

What i want the disc to do I would like it to generally install my game to the given directory assuming the given conditions have been met. Once installed, the disc dose not need to be used.

I have further functionality that i would like for my disc, however i think i should wait until i get this set finished.

As a summary, how do i code a disc to automatically install my game when put in the computer

I hope this was the correct place as this question, if you can answer please do, the more detailed the better. All input is appreciated. Even where to look as i have had no luck over 3 weeks.

Thanks to all in advance -zephyr

4
  • 1
    Is this specific to Windows?
    – nerdwaller
    Oct 13, 2014 at 10:34
  • I would preferable like it to work on windows, apple and linux as the game has to be completely un-bias to any user. However, if you can only provide a windows solution then i will more then happily take it :) Oct 13, 2014 at 10:36
  • You will also have to ensure the target computer already has java installed (JDK or JRE) and if it the right version and if not install java as well as your game ...
    – DavidPostill
    Oct 13, 2014 at 10:57
  • Yep great thanks, that would be awesome, ill keep that in mind thankyou Oct 13, 2014 at 20:05

1 Answer 1

1

In Windows, you can simply achieve it using an autorun.inf file in the root folder of your disc. All you need to do is, create a text file at the root folder of your disc, name it as autorun.inf and configure as to which EXE you want to execute when the disc is inserted.

Lets, say you want to run Setup.exe (also present in the root folder), below will be the file contents of autorun.inf,

[autorun] 
open=Setup.exe

You can read more about it here

4
  • Thanks thats heaps good :), is the startup exe able to be created in visual basic? Eg so i can create a program to install the game from their? Oct 13, 2014 at 10:39
  • you are welcome, glad it helped. The startup exe can be any windows executable. Oct 13, 2014 at 10:42
  • Sweat, ill start making it right away :) Oct 13, 2014 at 20:06
  • Last question, is their some other combination of files that i will need for this to work on linux and mac? Oct 13, 2014 at 20:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .