diff --git a/Install MS Teams-Preview.ps1 b/Install MS Teams-Preview.ps1 index 0f04408..ecb6dec 100644 --- a/Install MS Teams-Preview.ps1 +++ b/Install MS Teams-Preview.ps1 @@ -94,7 +94,7 @@ $Teams = (Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentV IF ($Teams) {$Teams.Insert(5,'0')} IF ($Teams -ne $Version) { -# Uninstalling MS Teams +#Uninstalling MS Teams IF (Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* | Where DisplayName -like "*Teams Machine*") { Write-Host -ForegroundColor Yellow "Uninstalling $Product" DS_WriteLog "I" "Uninstalling $Product" $LogFile @@ -111,7 +111,7 @@ Write-Host -ForegroundColor Green " ...ready!" Write-Output "" } -# MS Teams Installation +#MS Teams Installation Write-Host -ForegroundColor Yellow "Installing $Product" DS_WriteLog "I" "Installing $Product" $LogFile try { @@ -121,12 +121,12 @@ DS_WriteLog "E" "Error installing $Product (error: $($Error[0]))" $LogFile } DS_WriteLog "-" "" $LogFile +# Configure Teams Settings with json template +copy-item -Path "$PSScriptRoot\$Product\desktop-config.json" -Destination "C:\USers\Default\AppData\Roaming\Microsoft\Teams" + # Prevents MS Teams from starting at logon Start-Sleep 5 Remove-ItemProperty -Path "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Run" -Name "Teams" -Force -Write-Host -ForegroundColor Green " ...ready!" -Write-Output "" -} # Register Teams add-in for Outlook - https://microsoftteams.uservoice.com/forums/555103-public/suggestions/38846044-fix-the-teams-meeting-addin-for-outlook $appDLLs = (Get-ChildItem -Path "${env:ProgramFiles(x86)}\Microsoft\TeamsMeetingAddin" -Include "Microsoft.Teams.AddinLoader.dll" -Recurse).FullName @@ -147,6 +147,10 @@ New-ItemProperty -Path "HKLM:\SOFTWARE\WOW6432Node\IM Providers\Teams" -Name "GU New-ItemProperty -Path "HKLM:\SOFTWARE\WOW6432Node\IM Providers\Teams" -Name "ProcessName" -Type "String" -Value "Teams.exe" ) | Out-Null +Write-Host -ForegroundColor Green " ...ready!" +Write-Output "" +} + # Stop, if no new version is available Else { Write-Host "No Update available for $Product" diff --git a/Install MS Teams.ps1 b/Install MS Teams.ps1 index cb86eae..337c5a0 100644 --- a/Install MS Teams.ps1 +++ b/Install MS Teams.ps1 @@ -94,7 +94,7 @@ $Teams = (Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentV IF ($Teams) {$Teams.Insert(5,'0')} IF ($Teams -ne $Version) { -# Uninstalling MS Teams +#Uninstalling MS Teams IF (Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* | Where DisplayName -like "*Teams Machine*") { Write-Host -ForegroundColor Yellow "Uninstalling $Product" DS_WriteLog "I" "Uninstalling $Product" $LogFile @@ -111,7 +111,7 @@ Write-Host -ForegroundColor Green " ...ready!" Write-Output "" } -# MS Teams Installation +#MS Teams Installation Write-Host -ForegroundColor Yellow "Installing $Product" DS_WriteLog "I" "Installing $Product" $LogFile try { @@ -121,12 +121,12 @@ DS_WriteLog "E" "Error installing $Product (error: $($Error[0]))" $LogFile } DS_WriteLog "-" "" $LogFile +# Configure Teams Settings with json template +copy-item -Path "$PSScriptRoot\$Product\desktop-config.json" -Destination "C:\USers\Default\AppData\Roaming\Microsoft\Teams" + # Prevents MS Teams from starting at logon Start-Sleep 5 Remove-ItemProperty -Path "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Run" -Name "Teams" -Force -Write-Host -ForegroundColor Green " ...ready!" -Write-Output "" -} # Register Teams add-in for Outlook - https://microsoftteams.uservoice.com/forums/555103-public/suggestions/38846044-fix-the-teams-meeting-addin-for-outlook $appDLLs = (Get-ChildItem -Path "${env:ProgramFiles(x86)}\Microsoft\TeamsMeetingAddin" -Include "Microsoft.Teams.AddinLoader.dll" -Recurse).FullName @@ -147,6 +147,10 @@ New-ItemProperty -Path "HKLM:\SOFTWARE\WOW6432Node\IM Providers\Teams" -Name "GU New-ItemProperty -Path "HKLM:\SOFTWARE\WOW6432Node\IM Providers\Teams" -Name "ProcessName" -Type "String" -Value "Teams.exe" ) | Out-Null +Write-Host -ForegroundColor Green " ...ready!" +Write-Output "" +} + # Stop, if no new version is available Else { Write-Host "No Update available for $Product"