I also had issues when upgrading AdminUI from 12.6 to 12.7, here what I did:
Shutdown AdminUI
Upgrade AdminUI pre-reqs
Upgrade AdminUI
Delete folders siteminder/adminui/standalone/data and siteminder/adminui/standalone/tmp (it will remove the registration)
Run XPSRegClient to re-register AdminUI
Startup AdminUI
Browse to https://<hostname>:8443/iam/siteminder/adminui
Enter username, password and server for registration
Done
In case you want to fully uninstall AdminUI 12.6 to fresh install 12.7, you'll also need to edit the .com.zero.registry.xml file and remove the AdminUI 12.6 entries, that's why you were getting an error saying that the AdminUI was already installed. This file may be located on /var/, sometimes on the home directory, it depends on your system.