I am back from celebrating my birthday. Finally I can continue the hunt for a fix to that big bug that prevents some users from having a clean installation.
I have managed to find out more about what's wrong. It seems that even if I create an entirely empty project in Visual Studio 2010 and select to choose ClickOnce as the deployment method I will wind up with this bug. I have tried this both on my desktop and my laptop, so it shouldn't be something in my Visual Studio installation.
I have searched the net a bit for this specific error message and got some interesting results. First I found some post on MSDN where a Microsoft employee answered and told the developer that this was a bug with the installation of Microsoft .NET Framework. The installation was supposed to restart the computer after the installation of .NET and then continue the installation when the computer started again. However, since it seems that the bug in Stoffi does not require a restart to be solved (just a re-run of the installation) this doesn't seem to apply here.
I also found a few results where developers were encountering this problem on a specific set of machines, a number somewhere around 3% of the clients (this seemed to be consistent for several developers). I, however, have no idea how widespread this bug is.
One friend of mine e-mailed me and told me that his installation failed. Of course the installation had been successful on my two machines where I develop and test Stoffi. So I tried to install it on my girlfriends machine which is pretty much a vanilla Win7 installation. It failed. I then managed to find out that the bug only appeared if Microsoft .NET Framework as not installed. The dirty fix to just re-run the installation worked for my friend as well.
Have you tried to install Stoffi? Can you tell me how it went. Also let me know if the installation needed to install .NET for you or not.
I have also posted a post on MSDN asking for assistance, one Microsoft employee is looking that the problem right now.
However, I am looking at a completely different fix for this. I have planned to use my own installer instead of ClickOnce later on. This will make file associations better and will let me control the installation procedure more. I am right now trying to switch to a custom installer instead and see if that may remove this problem for me. This will probably introduce some permission problems since now Stoffi will be installed in Program Files instead of the user catalog, which means that it will not longer be able to write to itself. So the upgrade system will need more privileges in order to work. I really don't want to go the usual way and move the upgrade system into a separate application running in the background. I hate that approach and want to keep the upgrade code inside Stoffi. However, the alternative is to force Stoffi to run with heighten privileges, which is pretty bad from a security point.
So, what do you think? Let Stoffi run high security privileges or create a separate service that runs in the background (with high security privileges)? I vote for the first approach.