Installed packages are stored with uninstall IDs

It will either take the IDs from the installer in the manifest or from the registry (if only one change is detected).
lol, copy/pasta I guess