Got a similar error when uninstalling python. Solved it by downloading core.msi from https://www.python.org/ftp/python/3.11.2/amd64/core.msi (replace 3.11.2 with your version), putting it into PackageCache and then opening it from there.