You will need to uninstall the MaxDB installation completely. I am not sure how you are uninstalling the installation, but if there are still entries like services, registry entries of the old installation this will not permit you to continue with a new installation with the same SID.
If nothing works then reinstall the OS.