Update 8x8WorkInstall.ps1

This commit is contained in:
2025-04-10 11:04:18 +01:00
parent ce6b8b0ebd
commit a8603c0ac7

View File

@@ -4,10 +4,8 @@ $ErrorActionPreference = "Continue"
Start-Transcript -path C:\IntuneLogs\8X8Install.txt -Force Start-Transcript -path C:\IntuneLogs\8X8Install.txt -Force
# URL of the file to download # URL of the file to download
$url = "https://work-desktop-assets.8x8.com/prod-publish/ga/work-64-msi-v8.21.3-1.msi" $url = "https://work-desktop-assets.8x8.com/prod-publish/ga/work-64-msi-v8.21.3-1.msi"
# Local path to save the downloaded file # Local path to save the downloaded file
$outputFile = "$env:TEMP\work-64-msi-v8.20.2-12.msi" $outputFile = "$env:TEMP\work-64-msi-v8.20.2-12.msi"
# Download the file # Download the file
try { try {
Write-Host "Downloading $url to $outputFile..." Write-Host "Downloading $url to $outputFile..."
@@ -18,7 +16,6 @@ catch {
Write-Error "Error downloading file: $($_.Exception.Message)" Write-Error "Error downloading file: $($_.Exception.Message)"
exit 1 exit 1
} }
# Run the downloaded MSI # Run the downloaded MSI
try { try {
Write-Host "Running installer..." Write-Host "Running installer..."
@@ -29,7 +26,6 @@ catch {
Write-Error "Error running installer: $($_.Exception.Message)" Write-Error "Error running installer: $($_.Exception.Message)"
exit 1 exit 1
} }
#Optional: Remove the downloaded file after installation. #Optional: Remove the downloaded file after installation.
try { try {
Remove-Item $outputFile -ErrorAction Stop Remove-Item $outputFile -ErrorAction Stop
@@ -38,9 +34,6 @@ try {
catch{ catch{
Write-Warning "Failed to remove temporary file: $($_.Exception.Message)" Write-Warning "Failed to remove temporary file: $($_.Exception.Message)"
} }
exit 0 #Indicate success exit 0 #Indicate success
Write-Output "work-64-msi-v8.21.3-1.msi successfully installed." Write-Output "work-64-msi-v8.21.3-1.msi successfully installed."
Stop-Transcript Stop-Transcript