Uninstalling Teams

Questions about WAPT Packaging / Requests and help regarding Wapt packages.
Forum Rules
Community Forum Rules
* English support on www.reddit.com/r/wapt
* French community support is available on this forum
* Please prefix the topic title with [RESOLVED] if it is resolved.
* Please do not edit a topic that is tagged [RESOLVED]. Open a new topic referencing the old one.
* Specify the installed WAPT version, full version, and build number (2.2.1.11957 / 2.2.2.12337 / etc.) as well as the Enterprise/Discovery edition.
* Versions 1.8.2 and earlier are no longer supported. The only questions accepted regarding version 1.8.2 are related to upgrading to a supported version (2.1, 2.2, etc.).
* Specify the server OS (Linux/Windows) and version (Debian Buster/Bullseye - CentOS 7 - Windows Server 2012/2016/2019).
* Specify the OS of the administration/package creation machine and the machine with the problematic agent, if applicable (Windows 7/10/11/Debian 11/etc.).
* Avoid asking multiple questions when opening a topic, otherwise it may be ignored. If there are multiple topics, open separate topics, preferably one after the other and not all at the same time (i.e., do not spam the forum).
* Include code snippets, screenshots, and other images directly in the post. Links to Pastebin, Bitly, and other third-party sites will be systematically removed.
* As with any community forum, support is provided voluntarily by members. If you require commercial support, you can contact Tranquil IT's sales department at 02.40.97.57.55
Locked
f4242
Messages: 54
Registration: Nov 23, 2016 - 8:51 p.m.

June 29, 2020 - 10:29 PM

Hi,

I added this to the uninstall() block of the Teams package. Without it, Teams doesn't uninstall from users' home directories.

Code: Select all

#désinstallation dans les home des utilisateurs
    for user_profile in local_users_profiles():
        teamsUpdater = makepath(user_profile, 'AppData', 'Local', 'Microsoft', 'Teams', 'Update.exe')
        if isfile(teamsUpdater):
            print('Desinstallation de ' + teamsUpdater)
            run_notfatal(teamsUpdater + ' --uninstall -s')
        raccourciDemarre = makepath(user_profile, 'AppData','Roaming','Microsoft','Windows','Start Menu','Programs','Microsoft Teams.lnk')
        if isfile(raccourciDemarre):
            remove_file(raccourciDemarre)
        raccourciBureau = makepath(user_profile, 'Desktop', 'Microsoft Teams.lnk')
        if isfile(raccourciBureau):
            remove_file(raccourciBureau)
User avatar
jpele
Messages: 156
Registration: March 4, 2019 - 12:01
Location: Nantes

June 30, 2020 - 10:03

Hello,

We are aware of the problem; more and more software publishers are starting to install in a user environment. Currently, WAPT does not handle uninstallation in this scenario, at least not yet.

Please note that your code snippet may only work in a package development environment.

I suggest you create a separate package specifically for uninstalling Teams; the code already present in session_setup() should allow you to create this package without any issues.

Sincerely,
Jimmy
f4242
Messages: 54
Registration: Nov 23, 2016 - 8:51 p.m.

June 30, 2020 - 3:55 PM

jpele wrote: June 30, 2020 - 10:03 Hello,

We are aware of the problem, publishers are increasingly starting to install in the user environment.
Yes, and I don't really like this trend. We have a fairly strict SRP policy, and applications installed in AppData are a real pain that forces us to compromise our software security policy... The Teams installer is one of the worst I've ever encountered.
jpele wrote: June 30, 2020 - 10:03 Warning: your code snippet may only work in a package development environment.
Indeed, I just tried requesting an uninstallation from the console and it doesn't work. It only works in PyScripter or when using WaptGet from the command line. What explains this behavior?

I also added this to the session_setup() block to launch the installation (because it doesn't seem to start automatically):

Code: Select all

installer = makepath(programfiles32, 'Teams Installer', 'Teams.exe')
run('"' + installer + '" -s')
Unfortunately, it doesn't work in production either, only in development environments or via the command line by calling wapt-get session-setup. :(

This reminds me that I attempted a Teams MSI deployment for VDI a few weeks ago (I based it on https://www.masterpackager.com/blog/mst ...windows-10 (to create my package). It worked in the development environment but no longer worked in production. Is it the same reason? I liked this approach which allowed for a global installation rather than a per-user installation in AppData.

THANKS!
User avatar
jpele
Messages: 156
Registration: March 4, 2019 - 12:01
Location: Nantes

June 30, 2020 - 4:07 PM

The "ALLUSERS=1 ALLUSERS=1" flag is supposed to install Teams in System-Wide mode according to the official Microsoft documentation, but unfortunately, it only works in semi-system-wide mode. I've already spent a lot of time on the package; I'll wait for a few updates and hope that the double "ALLUSERS" flag will work in the future.

In the meantime, yes, we did install the package using the procedure mentioned, and it worked. You can find the package here: https://store.wapt.fr/store/details-tis ... ffce5.wapt

It needs to be tested to see if the procedure is still functional; I haven't retested it.
f4242
Messages: 54
Registration: Nov 23, 2016 - 8:51 p.m.

June 30, 2020 - 8:48 PM

That's pretty much what I was doing. I just tried your package and I have the same problem; it only works from my PC. When I deploy it, the package deploys without errors, but it seems like the app isn't actually installing. I can find the installed app with `wapt-get list-registry`, but there's nothing in C:\Program Files(x86)\Microsoft\Teams (the folder doesn't exist).
Locked