• Welcome to Support Forum: Get Support for Patch My PC Products and Services.
 

Teamsbootstrapper via Portal (Custom Apps) and Post Script

Started by djwatson2, July 31, 2024, 02:03:19 PM

Previous topic - Next topic

djwatson2

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.

Michael (Patch My PC)

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:
  • %ProgramData%\PatchMyPCIntuneLogs\PatchMyPC-ScriptRunner.log
  • This may be found in the %ProgramData%\PatchMyPC\ if the Install was initiated by the user from Company Portal.

When troubleshooting ConfigMgr application installation errors on a client:
  • %WinDir%\CCM\Logs\PatchMyPC-ScriptRunner.log
  • This may be found in the %ProgramData%\PatchMyPC\ if the Install was initiated by the user from Software Center.

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'
  • psexec.exe -i -s powershell.exe

Quote& "$PSScriptRoot\teamsbootstrapper.exe" -u
I'll look into if this is the best way to call the exe from within your script.

Michael (Patch My PC)

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.

Michael (Patch My PC)

He @djwatson2,

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

https://patchmypc.com/technical-support

I'm also wondering if you are running into a detection issue as well.

djwatson2

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.