You should really 'bite the bullet' and do a clean install anyway.

If you insist on upgrading, your W9x installation may not have any corruption.

The subject message will occur if your HKEY_LOCAL_MACHINE\Software\Microsoft\Windows key is missing or corrupt.

The only work around is to 'restore' a proper registry.