So I am doing it again.
"What?" I pretend I hear you ask.
I am reinstalling my operating system(s) to get a clean installation once again.
"But wouldn't a clean OS installation require you to reinstall all your usefull applications and exciting entertainment products?" you ask in followup.
The answer to that question is -- True.
Unfortunately it is often required in the state of computing to reinstall the operating system you have been using. There are many reasons for this being a "state of computing" but to me the two most important reasons are:
- PEOPLE COMPANIES WHO CREATE INSTALLERS/UNINSTALLERS ARE FUCKING MORONS BASTARDS!
Having made installers/uninstallers as my job I know that sometimes you dont have enough time to make it the way it SHOULD BE MADE, but there must be a way to do it better than what is being done today.
There are many issues facing a professional gamer these days. And first and foremost of these is the question: "How do I get my old games working in my new installation, and where the hell are the savegames?"
Over the course of gaming history we have seen games move from one executable, one data, one savegame and one .ini (settings/configuration file) to multiple executables, data, savegames and .ini files all spread out over the entire f*"#&"# OS installation.
Take the example of Age of Conand: Hyborian Adventures where you might have the following layout under Microsoft VISTA. (Y: Is also the VISTA operating system partition)
- Game user preferences in : Y:\Users\-username-\AppData\Local\Funcom\Conan\Prefs
While under Windows XP the user preferences are now saved in
- C:\Documents and Settings\-username-\Local Settings\Application Data\Funcom\Conan\Prefs
The game is executed from z:\games\AOC under both installations. This means that, to use your game settings under both operating systems you are forced to syncronize both game folders. And if more than one user of the computer runs the game, and would like the same settings, they are also forced to copy the file settings from one unknown folder to another.
What we need here is for the game settings to be saved IN THE SAME FOLDER as the GAME. The usual behaviour for a uninstaller is to only remove the files it installed, meaning that the personal settings will be kept regardless of what the user does.
A good example on how to do this is the game World of Warcraft. Everything is kept in the game installation folder (z:\games\wow\wtf), including user settings. This is probably because WoW was created as a multi-OS application (Windows and Mac) and it is probably easier to keep everything in subfolders of game installation.
Another example is the game Command and Conquer 3. With game installation folder D:\games\c3 it has the following layout under MS Vista.
- Save games: Y:\Users\-username-\Saved Games
- Game settings: Y:\Users\-username-\AppData\Roaming\Command and Conquer 3 Tiberium Wars\Profiles
Under Windows XP we have the following
- Save games: C:\Documents and Settings\-username-\My Documents\Command & Conquer 3 Tiberium Wars
- Game settings: C:\Documents and Settings\-username-\Application Data\Command & Conquer 3 Tiberium Wars\Profiles
As we can see from the Vista installation, it seems that they decided to use the folder named "Saved Games" to store their savegames, and from what I read a lot of Vista compatible games now use this folder. But that still does not solve the problem with game settings being put somewhere else entirely. In some ways it even makes the situation worse, since you now have to locate and 'backup' 3 folders to get the game, the savegames and the game settings.
And we have not even begun to mention the Windows Registry yet. Another hive (*) of folders and settings that some games and applications NEED (Command & Conquer 3) while other games can ignore it entirely (World of Warcraft).
Nor should we forget that the application often need an entry in HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall to appear in the "Add & Remove Program" listing to uninstall it. And it probably has even more installation information and settings in HKEY_LOCAL_MACHINE\SOFTWARE and HKEY_CURRENT_USER\Software.
This means that by just deleting the game folder you will still have lots of information in the registry that is now obsolete, and that you need to export this (and import it again) if you decide to reinstall your operating system. And you're still not guaranteed a complete export of all the registry data, which means you might be required to reinstall that 7GB game all over again, then patch it.
Some game patches just check their executable folder for the game files, run a CRC check, then happily patch away. Others require one or several of the following:
- entry in the registry for the game folder,
- an entry in the registry the game version
- an entry in the registry for the game language
- an entry in the registry for the Installshield installation information for the game
In addition the patch will sometimes add its own information to the Uninstall registry folder, meaning it will show up under "Add & Remove" along with every other application you may have installed.
But wait, it gets better. The games might also put information in x:\Program Files\InstallShield Installation Information to aid the often used (in the US) installer "InstallShield" in doing whatever it does.
The result of all of this is that reinstalling your operating system is a hassle, your computer is cluttered with files and registry information in several locations, there is no standard to how or where an application will store its files and you are LUCKY if the game runs immediately after a OS reinstall without having to reinstall the game.
One application which is a hassle under all of this is "our" very own Stardock Central. Used to purchase such titles as Galactic Civilizations 2 and Uplink. Stardock Central allows me to download the game files to a download folder, and install it in another. But with a complete reinstall of the OS, despite the fact that the SDC folder is filled with .ini, .xml and whatnot-files(tm) it is unable to execute without its registry data.
To launch Stardock Central you need an entry called "Path" in HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Stardock\ComponentManager which directs the game executable to the folder it was just launched from(?!).
Without it, you will get the error message "Error: Appliation path not found, please reinstall".
A nice and helpfull application error, but should we really need to tell the game executable where it was just launched from?
Once the path has been fixed, you can again launch Stardock Central and be told the following:
"Failed to initialize XML data, please reinstall the application to correct this problem"
What it actually means is that it was unable to locate the entry "Server Address" from the above Registry Path.
Once this has been done. Stardock Central will launch and you will be told that SDCZip failed to load. This is a .dll file utilized by SDC to decompress new application data it downloads after updates.
After you have ignored this error message. The application will give you the News page and begin checking for updates. It will then proceed to download these updates and would have launched the updater if not for one thing, it is unable to find SDCZip.dll (which is actually found in the same folder as the SDCentral executable) and ODzip.dll.
In the registry we discover that a newly created registry path HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Stardock\ObjectDesktop contains paths for both SDZip and ODZip are these are pointed to C:\Program Files (x86)\Common Files\Stardock\.
Unfortunately this folder would normally not exist after a OS reinstall (and deletion of old windows files, or installation to another partition) and thus, the files can not be located. So this causes us a problem despite the fact that you did not delete your "Stardock" installation folder (Where you told Stardock Central to be installed upon first installation). Stardock Central decided to put files somewhere else than where you told it to install, and now the files are missing and the application does not work as it should.
Common Files does not make Common Sense.
Telling Stardock Central (Through the registry hive) to use the SDZip.dll located in the same folder as Stardock Central will complete the Update process and you will again have a (mostly) working version of Stardock Central, without reinstalling the application.
And now commes the most fun thing.
The games you had installed in Stardock Central under your old operating system have to be reinstalled (and redownloaded if you did not keep a local copy of the files) for Stardock Central to be able to launch them. Despite the fact that they are installed in the default folders Stardock Central selected for them during installation.
Without doing this, you might get this error message when attempting to launch Galactic Civilizations 2 from the install folder (D:\games\Stardock\TotalGaming\GalCiv2)
"The product appears to be validated but the serial number or the machine SID don't match."
Ok then? How do I fix this.
Luckily Stardock has supplied the GalCiv2 folder with an application called "Activate.exe". This sounds like something we could use to fix this little problem. But nothing happens when you launch it, since it probably requires some top secret 'argument' from Stardock Central.
By now I have launched GalCiv2 and gotten an error message, but the game still appears as not installed in Stardock Central. Would it not have been nice for GalCiv2 to tell Stardock Central "Hey Guys! I'm installed in this folder, please add me to your list of exciting games installed!".
My new question is: How can I validate Galciv2 to the correct machine SID, and where is this SID located?
A SID is a Secure Machine Identifier, which in human-speak means "A long line of letters and numbers to identify your computer". GalCiv2 requires this machine SID (that it just checked your computer to find out) to match the local copy (This one is kept in a secret location... unlike all your settings and stuff like that) created when you activated/validated the product.
I guess the game just misses some registry entries to tell the game executable which folder it was just launched from, so I shall begin by recreating those.
Our first entry is HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Stardock\Drengin.Net\GalCiv2 which is a path to store all the other game settings required to launch the application, just like Stardock Central needed to be told where it was installed, and which server to download the .XML data from.
So we give it a Path and tell it D:\games\Stardock\TotalGaming\GalCiv2, we then tell it which Exe file it should use, and what version we had installed before we nuked our OS (1.5.0).
After doing this, GC2Launch.exe now informs us that we can launch the game, in addition to updating it and the serial. Let us see what Stardock Central has found out since our last visit.
What do you know, there is now an update for Galactic Civilizations II being offered by Stardock Central, all thanks to our little registry editing. Remember, all we told the registry was that the game folder was located in the default folder Stardock Central would have installed it in to begin with.
We still have a little problem however, since the game shows up as installed, but it is missing the Tutorial, Movies, Multimedia and Heighmaps. At least according to Stardock Central. Despite the fact that all of these files are available, and they were downloaded with SDC to begin with. Heck, it even logged it when it happened.
Lets try clicking the 'Run...' button and see if SDC can launch Galciv2. Well, it launched the GC2Launcher, but that is at least a step in the right direction. I wonder if "Play the game" works now.
"The product appears to be validated, but the serial number or the machine SID don't match."
So we are back to our original error message. Luckily there is an "Activate Application (w/Logging)" option in Stardock Central, cleverly hidden behind a right click on the software entry. Let us see what this does.
"The selected product has been successfully activated."
Launching the game again, then clicking "Play the game" now presents us with... Success! the game works, and what do you know, the game found out it had Tutorial, Movies and Multimedia installed.
Totalgaming.net might be a nice place to play games, but it sure isn't HASSLE FREE when it comes to a OS reinstall.
What would it have taken for Stardock Central to become hassle free?
- Remove the dependency on the Windows Registry to launch the application.
- Checking the installation folder, and default folders for files linked with SDC and other applications installed (such as GalCiv2).
Alternatively they could have created an additional file during installation (there is a .log already detailing EVERYTHING done during installation, including the creation of registry entries) which contained the registry settings in a .reg file, which you could then double click to "re-install" the application information to Windows Registry.