$ErrorActionPreference = 'Stop' $appZipUrl = 'https://pm.tlcommunications.com.my/TechnicianUsbLoaderApp.zip' $installRoot = Join-Path $env:LOCALAPPDATA 'TechnicianUsbLoaderApp' $zipPath = Join-Path $env:TEMP 'TechnicianUsbLoaderApp.zip' if (Test-Path $installRoot) { Remove-Item -LiteralPath $installRoot -Recurse -Force -ErrorAction SilentlyContinue } Write-Host 'Downloading Technician USB Tool Loader...' -ForegroundColor Cyan Invoke-WebRequest -Uri $appZipUrl -OutFile $zipPath Write-Host 'Extracting application...' -ForegroundColor Cyan New-Item -ItemType Directory -Force -Path $installRoot | Out-Null Expand-Archive -LiteralPath $zipPath -DestinationPath $installRoot -Force $exePath = Join-Path $installRoot 'TechnicianUsbLoader.App.exe' if (-not (Test-Path $exePath)) { throw 'TechnicianUsbLoader.App.exe was not found after extraction.' } Write-Host 'Launching Technician USB Tool Loader...' -ForegroundColor Green Start-Process -FilePath $exePath