Files
8x8WorkSystemWide/8x8WorkInstall
2025-04-09 20:00:29 +01:00

55 lines
1.6 KiB
Plaintext

$ErrorActionPreference="SilentlyContinue"
Stop-Transcript | out-null
$ErrorActionPreference = "Continue"
Start-Transcript -path C:\IntuneLogs\8X8Install.txt -Force
# Define the path to the installer (assuming it's in the same directory as this script)
#$installerPath = Join-Path $PSScriptRoot "work-64-msi-v8.20.2-12.msi"
# Start the installation process silently
#msiexec.exe /i $installerPath /quiet
#Wait-Process -Name "msiexec"
#Start-Sleep -Seconds 60
# URL of the file to download
$url = "https://work-desktop-assets.8x8.com/prod-publish/ga/work-64-msi-v8.20.2-12.msi"
# Local path to save the downloaded file
$outputFile = "$env:TEMP\work-64-msi-v8.20.2-12.msi"
# Download the file
try {
Write-Host "Downloading $url to $outputFile..."
Invoke-WebRequest -Uri $url -OutFile $outputFile -ErrorAction Stop
Write-Host "Download complete."
}
catch {
Write-Error "Error downloading file: $($_.Exception.Message)"
exit 1
}
# Run the downloaded MSI
try {
Write-Host "Running installer..."
Start-Process -FilePath "msiexec.exe" -ArgumentList "/i", "`"$outputFile`"", "/qn", "/norestart" -Wait -ErrorAction Stop
Write-Host "Installation complete."
}
catch {
Write-Error "Error running installer: $($_.Exception.Message)"
exit 1
}
#Optional: Remove the downloaded file after installation.
try {
Remove-Item $outputFile -ErrorAction Stop
Write-Host "Temporary file removed."
}
catch{
Write-Warning "Failed to remove temporary file: $($_.Exception.Message)"
}
exit 0 #Indicate success
Write-Output "work-64-exe-v8.20.2-12.exe successfully installed."
Stop-Transcript