cogito cogito ergo cogito sum
How do you get a product up and running with a new OS?
Published on June 11, 2008 By ins11 In PC Gaming

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!
  • WINDOWS

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.

Argh!


Comments
on Jun 11, 2008
Totalgaming.net might be a nice place to play games, but it sure isn't HASSLE FREE when it comes to a OS reinstall.


If you know you're going to do it in advance, rather than due to a sudden disk failure or similar catastrophe, then just archive it first, and restore the archive afterwards. Two or three clicks to archive, and same to put it back with everything in order and good as new. Simple.
on Jun 11, 2008

Totalgaming.net might be a nice place to play games, but it sure isn't HASSLE FREE when it comes to a OS reinstall.If you know you're going to do it in advance, rather than due to a sudden disk failure or similar catastrophe, then just archive it first, and restore the archive afterwards. Two or three clicks to archive, and same to put it back with everything in order and good as new. Simple.

Thanks for the comments.

However, that still does not solve the problem for all the non TG games and other applications in my OS, and there is no 'archive' option for SDC itself.

If applications became "self-aware" (in that they did not take over the world, but found our where they were located) it should be fairly easy for an application to .. just work, regardless of teh OS installation.  Just like World of Warcraft does, for example.

Edit. Just did an "Archive" and I got a 150MB .SDC file.  This is all nice to have if you move the .sdc files around, and reinstall Stardock Central first. But when all you want to (and should need to) reinstall is the OS, it is just an extra 150MB you dont need.  Better than nothing, but if I already have a folder for SDC and another for GalCiv2 there is no help in an archive file. 

Edit2: How do I delete the archive from the SDC gui?

 

on Jun 11, 2008
and there is no 'archive' option for SDC itself.


For SDC itself, is it really too much to ask to just reinstall it? It's not exactly a huge download, if you don't still have the installer on your machine somewhere.



If applications became "self-aware" (in that they did not take over the world, but found our where they were located) it should be fairly easy for an application to .. just work, regardless of teh OS installation. Just like World of Warcraft does, for example.


Self-contained applications are not compatible with the concept of a multi-user system where users don't have full access to everything. That's why apps write to the user folder and the registry (and such behaviors are required for Games for Windows certification, as well). Limited users can only write to the user folder and similarly designated locations; writing to the application folder requires admin privileges (which is to be avoided aside from the initial installation).

One might argue that it was better the "old fashioned way" for technical users, but the majority of users aren't, and such measures are needed to protect them from themselves, to prevent tampering on business machines, etc.
on Jun 11, 2008
@Kryo:
Well, on the subject of SDC it is not that hard to redownload and reinstall it, but when all it took to make the already installed product (in terms of files) to work was giving it 2 registry entries and modifying 1 it would be equally simple to make it just 'work' without that registry information. (Edit: Course, I think its more "fun" getting it to work through hours of manual work, than a 5 second download and 10 second installation process..)

When it comes to folder settings and permissions, is not an application installer able to set permissions on subfolders it creates in for example "Program Files/" and thus able to keep a folder there for all game saves/settings. I notice that with Vista they give you the option to set a save game folder, and if every game developer used that folder for savegames (and settings) that would be a great thing, because it would mean you would only have to look one place for everything.

But not everyone follows that new standard, and old games surely will not follow that new regime. What is so annoying is that games that may be Logo Certified (or not) write to so many different folders, some put the files in "My Documents" some in "My Documents/My Games" some in "Application Data" some in "Local Settings/application data". Do game developers have so many options available to them as to which folders to use for settings and savegames? If everyone used "My Documents/My Games" at least you could get everything in the same folder, just as you would if they all kept their files to the game installation folder (although with permission issues).

Not being non-technical user myself I cant answer this question, but it seems surprising if a non technical user would be happier when he cant locate his savegames, have to reconfigure all his settings and have to reinstall the game and redownload/repatch whenever he did a OS reinstall.

Perhaps there would be a market for a "game fixer", which scanned the computer for your games, savegames and settings and gave you easy access to backup/restore/transfer. Sort of an extension to Xfire Game Browser. Oh whell. Guess the only way to get that is to make it myself

Not sure if WoW has the Certification (not that they would need it, I suppose). But they have multi-users write to text files containing settings inside the game folder, and the game is 'self contained'. Why can they get away with it?
on Jun 11, 2008
Not being non-technical user myself I cant answer this question, but it seems surprising if a non technical user would be happier when he cant locate his savegames, have to reconfigure all his settings and have to reinstall the game and redownload/repatch whenever he did a OS reinstall.


Moot point, as a non-technical user is unlikely to ever reinstall his OS. Should the need for such arise, it'd generally be due to a catastrophic hardware failure or virus anyway, and he'd have it done by a third party who would either deal with that stuff, or just reformat the disk entirely.

But not everyone follows that new standard, and old games surely will not follow that new regime. What is so annoying is that games that may be Logo Certified (or not) write to so many different folders


That fault lies with Microsoft, for changing their requirements without any apparent benefit (XP Logo vs GFW has differing requirements for user file locations, for instance), or making them vague in some regards. In general though, it is expected of applications to have their files contained in their own subfolders of the approrpiate locations, rather than a common dump. It is possible after all for user files to have the same names or extension between games, etc, which would be problematic if they were stored in some common location. That's not really something easily solved without an entirely metadata based file system.

Not sure if WoW has the Certification....Why can they get away with it?


It doesn't, and you're right, they don't need it. Blizzard is plenty big and well-known enough that they have no need for what little marketing boost GFW certification may provide (besides that, the game predates GFW anyway). But due to the way it's designed, I'd expect it requires admin privileges or specially set folder permissions when run from a limited account, both of which are no-nos as far as multi-user system design goes.