I have been busy upgrading computers to Windows 8 now that the RTM is available. So far so good, though I ran into a problem with a printer which, oddly, worked fine in the Windows 8 Release Preview.
The printer is a Kodak All-on-one. Kodak has a universal installer for all its all-in-one printers. When I ran this, I got a message that .NET Framework 2.0 was needed and would be updated.
It would then try to install .NET 2.0, but fail.
Easy, I thought, just install .NET first. In Windows 8, you do this through Control Panel – Programs – Turn Windows features on or off.
I installed .NET Framework 3.5, which includes 2.0, and re-tried the Kodak printer install. Same message, same error.
I also tried running the installer in compatibility mode for Windows 7 and Windows XP. No go.
Time for some serious troubleshooting. I presumed that if I could figure out what the installer was looking for when it failed to detect .NET Framework 2.0, I could fix it.
First, I checked the official instructions for detecting .NET in an installer. This was already correct.
Next, I downloaded Process Monitor to see if I could spot the registry query or file search the installer was making. I noticed that aio_install.exe, the Kodak installer, unpacks a setup into a temporary location and runs from there. I copied the extracted files and ran the setup. Using Process Monitor, I discovered a registry query to HKCU\Software\Kodak\BootStrapInstallStatus and the REG_DWORD key InstallStatusKeyForDotnet. This was currently set to 1. In a spirit of experimentation I changed the 1 to a zero.
Next I re-ran setup. It worked perfectly.
I still do not know why that registry key was set, but I am not inclined to pursue it further. Possibly if .NET Framework 2.0 is already installed before you run the Kodak installer for the first time, the problem does not arise.
If you encounter this problem though, I suspect the following two steps will be sufficient:
1. Install .NET Framework 3.5 using Control Panel.
2. If installing the printer driver fails, check for the registry key HKCU\Software\Kodak\BootStrapInstallStatus\InstallStatusKeyForDotnet and set it to 0.