Deyda / NeverRed

NeverRed's focus is to provide a simple solution to keep standard software up to date without having to package it or search and compare versions on vendor sites. https://www.deyda.net/index.php/en/neverred/
31 stars 5 forks source link

New Teams teamsbootstrapper.exe doesn't download on first NeverRed run. #81

Closed chezzer64 closed 2 months ago

chezzer64 commented 2 months ago

On a machine where NeverRed has not been run before to download/install New Teams, the teamsbootstrapper.exe fails to download on the initial run of NeverRed due to the "$PSScriptRoot\$Product\Microsoft Teams 2" directory not having been created at that point. The result is that the New Teams install subsequently fails (on non Win Server 2019 OS) as teamsbootstrapper.exe is missing.

Suggest the following fix - change the following code:

            If ($WhatIf -eq '0') {
                Get-Download "https://go.microsoft.com/fwlink/?linkid=2243204&clcid=0x409" "$PSScriptRoot\$Product\" teamsbootstrapper.exe
            }

to:

            If ($WhatIf -eq '0') {
                If (!(Test-Path -Path "$PSScriptRoot\$Product")) { New-Item -Path "$PSScriptRoot\$Product" -ItemType Directory | Out-Null }
                Get-Download "https://go.microsoft.com/fwlink/?linkid=2243204&clcid=0x409" "$PSScriptRoot\$Product\" teamsbootstrapper.exe -includeStats
            }
Deyda commented 2 months ago

Thx..Correction in Version 2.10.33