MACOS: unload agent+UI at quit, WIN: quit agent+UI