# KOMPUTAH AI for Windows. # irm https://ai.komputah.com/install.ps1 | iex $ErrorActionPreference = 'Stop' $ProgressPreference = 'SilentlyContinue' $base = if ($env:KOMPUTAH_BASE) { $env:KOMPUTAH_BASE.TrimEnd('/') } else { 'https://ai.komputah.com' } $url = "$base/downloads/KOMPUTAH-AI-windows-x64-setup.exe" $setup = Join-Path $env:TEMP 'KOMPUTAH-AI-setup.exe' Write-Host 'KOMPUTAH AI' -ForegroundColor White Write-Host 'Downloading for Windows...' Invoke-WebRequest -Uri $url -OutFile $setup -UseBasicParsing $head = [System.IO.File]::ReadAllBytes($setup)[0..1] if ($head[0] -ne 0x4D -or $head[1] -ne 0x5A) { Remove-Item $setup -Force -ErrorAction SilentlyContinue Write-Host 'The download is not ready yet. Please try again in a few minutes.' -ForegroundColor Yellow return } Write-Host 'Installing...' Start-Process -FilePath $setup -ArgumentList '/S' -Wait Remove-Item $setup -Force -ErrorAction SilentlyContinue Write-Host 'KOMPUTAH AI is installed. Find it in the Start menu.' -ForegroundColor Green $dir = Join-Path $env:LOCALAPPDATA 'KOMPUTAH AI' $exe = Get-ChildItem -Path $dir -Filter '*.exe' -ErrorAction SilentlyContinue | Where-Object { $_.Name -notmatch 'uninstall' } | Select-Object -First 1 if ($exe) { Start-Process $exe.FullName }