Question

I'm making a set of games in flash that will be distributed via CD. What i want is for the user to install the game on his computer, but be forced to have the CD in the optical drive when running the game. Something like in this screenshot: http://i.imgur.com/yCh8NHt.png

I want to do that by putting an installer and a text document on the CD, when the user tries to launch the installed game, the game will first check if it can find the text document on the CD. However the problem is that drive letters and names are different from computer to computer. ANy ideas how i could accomplish this? Or a completely alternative method of doing it?

Était-ce utile?

La solution

It's not an elegant solution perhaps, but you could generate file paths with every drive letter from say D to Z and iterate over each until one succeeds to load or the end of the list is reached, in which case you can determine that the CD is not in the tray.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top