Posts Tagged ‘Windows’

Manual Installer

May 31, 2009

I discovered something recently. What I discovered is that my original method of distributing the Forgotten Times series doesn’t work. Originally, I had thrown the Forgotten Times executables, and the data files that actually power the games into a folder creatively called “Files”, made a shortcut to the executable in the main distribution folder, then zipped everything up and put it on the web site.

The problem with the above approach is that windows shortcuts use absolute locations, and every location is different depending on the name of the user account it’s running under. As an example, if my user name is “Sid” (which, on this computer, it is), then the path name for any file located on my desktop will start with “C:\Documents and Settings\Sid\Desktop\”. Because of this, whenever the zipped distribution folder was downloaded onto a new machine, the shortcut would try and look for the data files the executable needs to run in the location they were stored on the original machine (e.g., “C:\Documents and Settings\Sid\Desktop\FT\Files”) rather than their location after the download (e.g., C:\Documents and Settings\Your Name\Desktop\FT\Files”). The result, predictably, was that the executable would enter an infinite loop, forlornly looking for the data files in a location that simply didn’t exist in its new host environment. Very sad.

Anyway, I ended up deciding to solve this problem by making a wink program demonstrating for a user how to find the executables, and make a new shortcut on their own machines. It isn’t the most elegant solution, but it should get over the fact that I have no real way of knowing what the relevant user names will be on the machines where my programs are downloaded. Someday, I may end up writing a full install script. However, for now, wink it shall be.