diff --git a/microsoft-teams-msix/microsoft-teams-msix.nuspec b/microsoft-teams-msix/microsoft-teams-msix.nuspec new file mode 100644 index 00000000..cfdd9102 --- /dev/null +++ b/microsoft-teams-msix/microsoft-teams-msix.nuspec @@ -0,0 +1,30 @@ + + + + + microsoft-teams-msix + 23320.3021.2567.4799-pre + https://github.com/flcdrg/au-packages/tree/master/microsoft-teams-msix + flcdrg + Microsoft Teams MSIX files + Microsoft + https://learn.microsoft.com/en-us/microsoftteams/new-teams-bulk-install-client + https://rawcdn.githack.com/flcdrg/au-packages/a441d3dd9b117e3e3c34fc6b06f070a382718ba6/microsoft-teams-new-bootstrapper/icons/teams-new.png + 2023 Microsoft Corporation + https://support.microsoft.com/en-us/office/microsoft-teams-subscription-supplemental-notice-60cc09bf-b02a-4a26-8e4a-ad697194bebf?ui=en-us&rs=en-us&ad=us + false + https://learn.microsoft.com/en-us/microsoftteams/teams-overview?WT.mc_id=DOP-MVP-5001655 + teams office 365 chat collaboration + Microsoft Teams new client bootstrapper installer + MSIX files used by the Microsoft Teams New Bootstrapper package. + + This package is not intended to be installed directly and is only used by the Microsoft Teams New Bootstrapper package. + + The package version is based on the Version attribute of the Identity element from the AppManifest.xml file. + + + + + + + diff --git a/microsoft-teams-msix/tools/chocolateyinstall.ps1 b/microsoft-teams-msix/tools/chocolateyinstall.ps1 new file mode 100644 index 00000000..7bc0968e --- /dev/null +++ b/microsoft-teams-msix/tools/chocolateyinstall.ps1 @@ -0,0 +1,19 @@ +$ErrorActionPreference = 'Stop'; +$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" +$packagePath = $(Split-Path -parent $toolsDir) +$filename = "MSTeams.msix" +$installPath = Join-Path $packagePath $filename + +$packageArgs = @{ + packageName = $env:ChocolateyPackageName + + url = "https://statics.teams.cdn.office.net/production-windows-x86/enterprise/webview2/lkg/MSTeams-x86.msix" + checksum = '2AAB6D3DD221CF072FFAC7FB33AC4CEC18036723FF02E946679342655FA3C693' + checksumType = 'sha256' + url64bit = "https://statics.teams.cdn.office.net/production-windows-x64/enterprise/webview2/lkg/MSTeams-x64.msix" + checksum64 = 'E7037A45E1F40BA569C92D7C7503F51827C146207B1185BA5FA634B2FA6C5009' + checksumType64= 'sha256' + fileFullPath = $installPath +} + +Get-ChocolateyWebFile @packageArgs diff --git a/microsoft-teams-msix/tools/chocolateyuninstall-x.ps1 b/microsoft-teams-msix/tools/chocolateyuninstall-x.ps1 new file mode 100644 index 00000000..bec05ea8 --- /dev/null +++ b/microsoft-teams-msix/tools/chocolateyuninstall-x.ps1 @@ -0,0 +1,69 @@ + +## NOTE: In 80-90% of the cases (95% with licensed versions due to Package Synchronizer and other enhancements), +## AutoUninstaller should be able to detect and handle registry uninstalls +## See https://docs.chocolatey.org/en-us/choco/commands/uninstall +## and https://docs.chocolatey.org/en-us/create/functions/uninstall-chocolateypackage + +$ErrorActionPreference = 'Stop'; +$packageArgs = @{ + packageName = $env:ChocolateyPackageName + softwareName = 'microsoft-teams-msix*' #part or all of the Display Name as you see it in Programs and Features. It should be enough to be unique + fileType = 'msix' + silentArgs = "/S" + + #OTHERS + # Uncomment matching EXE type (sorted by most to least common) + #$silentArgs = '/S' # NSIS + #silentArgs = '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART' # Inno Setup + #silentArgs = '/s' # InstallShield + #silentArgs = '/s /v"/qn"' # InstallShield with MSI + #silentArgs = '/s' # Wise InstallMaster + #silentArgs = '-s' # Squirrel + #silentArgs = '-q' # Install4j + #silentArgs = '-s -u' # Ghost + # Note that some installers, in addition to the silentArgs above, may also need assistance of AHK to achieve silence. + #silentArgs = '' # none; make silent with input macro script like AutoHotKey (AHK) + # https://chocolatey.org/packages/autohotkey.portable + + validExitCodes= @(0) +} + +$uninstalled = $false +# This is only a fuzzy search if $softwareName includes '*'. Otherwise it is +# exact. In the case of versions in key names, we recommend removing the version +# and using '*'. +[array]$key = Get-UninstallRegistryKey -SoftwareName $packageArgs['softwareName'] + +if ($key.Count -eq 1) { + $key | % { + $packageArgs['file'] = "$($_.UninstallString)" #NOTE: You may need to split this if it contains spaces, see below + + if ($packageArgs['fileType'] -eq 'MSI') { + $packageArgs['silentArgs'] = "$($_.PSChildName) $($packageArgs['silentArgs'])" + $packageArgs['file'] = '' + } else { + # NOTES: + # - You probably will need to sanitize $packageArgs['file'] as it comes from the registry and could be in a variety of fun but unusable formats + # - Split args from exe in $packageArgs['file'] and pass those args through $packageArgs['silentArgs'] or ignore them + # - Ensure you don't pass double quotes in $file (aka $packageArgs['file']) - otherwise you will get "Illegal characters in path when you attempt to run this" + # - Review the code for auto-uninstaller for all of the fun things it does in sanitizing - https://github.com/chocolatey/choco/blob/bfe351b7d10c798014efe4bfbb100b171db25099/src/chocolatey/infrastructure.app/services/AutomaticUninstallerService.cs#L142-L192 + } + + Uninstall-ChocolateyPackage @packageArgs + } +} elseif ($key.Count -eq 0) { + Write-Warning "$env:ChocolateyPackageName has already been uninstalled by other means." +} elseif ($key.Count -gt 1) { + Write-Warning "$($key.Count) matches found!" + Write-Warning "To prevent accidental data loss, no programs will be uninstalled." + Write-Warning "Please alert package maintainer the following keys were matched:" + $key | % {Write-Warning "- $($_.DisplayName)"} +} + +## OTHER POWERSHELL FUNCTIONS +## https://docs.chocolatey.org/en-us/create/functions/ +#Uninstall-ChocolateyZipPackage @packageArgs # Only necessary if you did not unpack to package directory - see https://docs.chocolatey.org/en-us/create/functions/uninstall-chocolateyzippackage +#Uninstall-ChocolateyEnvironmentVariable # https://docs.chocolatey.org/en-us/create/functions/uninstall-chocolateyenvironmentvariable +#Uninstall-BinFile # Only needed if you used Install-BinFile - see https://docs.chocolatey.org/en-us/create/functions/uninstall-binfile +## Remove any shortcuts you added in the install script. +