'Insert this line before invoking any ArcObjects to bind Engine runtime. ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.Desktop)
The solution in that link is pretty much the same thing as the code I posted except they're putting the installer class in its own project. They then add new custom actions to the installer project to call this installer class. I used the same installer class that I had been using just so that I wouldn't have to remove the old custom actions and add new ones (not that it would take any real effort to do so). The big difference between their solution and mine is how the installer class get the path to your assembly. In my code, I'm using the Reflection namespace to get the needed path. It's easy and it works. Their solution is getting the path through a property you have to set inside your installer project. This is what they're doing in the walkthrough when they are setting the CustomActionData property in the custom action properties dialog. If you use this solution, you'll have to change this so that it uses the location of the assembly you want to register. I haven't tried it but you'll probably need to change the value to something like this: /arg1="[TARGETDIR]\yourAssemblyName.dll". This is assuming you're installing the assembly directly to the target directory. Othewise you'll also have to append whatever subdirectory path you're installing to before the assembly filename.