Support Forum: Get Support for Patch My PC Products and Services

Commercial Products: Support for Our Enterprise Product for Microsoft ConfigMgr and Intune => Commercial/Paid Products: Support and General Questions (ConfigMgr and Intune) => Topic started by: djwatson2 on July 31, 2024, 02:03:19 PM

Title: Teamsbootstrapper via Portal (Custom Apps) and Post Script
Post by: djwatson2 on July 31, 2024, 02:03:19 PM
Goal: Create a custom app with Portal.patchmypc.com for teamsbootstrapper.exe and apply a post-script to run the teamsbootstrapper -u to remove the old versions from the computer. Warn and force quit teams.

I was able to create the app using the website. After the app shows up in the Publishing app, I then set the behavior of the notifications and point it to a file share with the post install script.

Script content (1 liner):
& "$PSScriptRoot\teamsbootstrapper.exe" -u

It will attempt to run the bootstrapper. When it gets to running the script, I get an error. Not sure how I can troubleshoot this.
Do we have some docs or suggestions on how to troubleshoot post install scripts?

It looks like teamsbootstrapper.exe -u may fail if there is no installations of the old client.
Title: Re: Teamsbootstrapper via Portal (Custom Apps) and Post Script
Post by: Michael (Patch My PC) on July 31, 2024, 02:26:16 PM
Hi @djwatson2,

The error code from the Post Script can be found in the PatchMyPC-ScriptRunner.log

Depending on how you are deploying the application it can be located in a few different places:

When troubleshooting Intune application installation errors on a client:

When troubleshooting ConfigMgr application installation errors on a client:

Hopefully can have some additional information to help troubleshoot.

The other way to troubleshoot this is to try and run your powershell script as SYSTEM by utilizing 'psexec'

Quote& "$PSScriptRoot\teamsbootstrapper.exe" -u
I'll look into if this is the best way to call the exe from within your script.
Title: Re: Teamsbootstrapper via Portal (Custom Apps) and Post Script
Post by: Michael (Patch My PC) on August 01, 2024, 04:47:24 PM
Hi @djwatson2,

I did some testing with this.

& "$PSScriptRoot\teamsbootstrapper.exe" -u
This command does run fine, but I think the problem might be with the exit code it generates. I don't have a client with 'Old' teams to test with, but when running it on a client without 'old' team I get an exit code of '-2147024809' because it can't find any 'old' teams installs.

You may want to modify the script to something like below
Start-Process -FilePath "teamsbootstrapper.exe" -WorkingDirectory "$PSScriptRoot" -ArgumentList "-u" -Wait
Exit 0

So that no matter what, the exit code from the script is always 0, and there is also no output displayed.
Title: Re: Teamsbootstrapper via Portal (Custom Apps) and Post Script
Post by: Michael (Patch My PC) on August 01, 2024, 05:41:19 PM
He @djwatson2,

If you want to open up a support case, you can use the below link:

https://patchmypc.com/technical-support (https://patchmypc.com/technical-support)

I'm also wondering if you are running into a detection issue as well.
Title: Re: Teamsbootstrapper via Portal (Custom Apps) and Post Script
Post by: djwatson2 on August 02, 2024, 03:06:32 PM
I think I'm doing this the hard way. I'm going to try -p -u and get back to this forum.

This software is a pain in the backside. If this works to remove it from computers, I hope others find this post.