There's a solution for that: create a file called "Teams." in %APPDATA%\Microsoft. The installer will absolutely try to install itself to %appdata% (instead of, say, %programfiles% or any admin-configurable path), and having a file there will prevent the installer from creating its installation directory.