# FlashVMM for Windows: irm https://release.flashvmm.com/dist/flashvm/stable/install.ps1 | iex # Published to the channel by packaging/dist/publish-flashvm.sh; gated by its --dry-run on both Windows # gate boxes (FLASHVMM_INSTALL_DRYRUN=1: resolve, download and verify, install nothing, change nothing). # Run in PowerShell as Administrator. Installs the current release (x64 or ARM64) from the signed # channel, verifying the MSI's SHA-256 before it runs, and turns on automatic updates. & { $ErrorActionPreference = 'Stop' $ProgressPreference = 'SilentlyContinue' $base = 'https://release.flashvmm.com/dist/flashvm/stable' $dry = $env:FLASHVMM_INSTALL_DRYRUN -eq '1' $admin = ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator) if (-not $admin) { Write-Host 'FlashVMM: run this in PowerShell as Administrator (right-click PowerShell, Run as administrator).' -ForegroundColor Red return } # The Windows Hypervisor Platform: FlashVMM's engine. Turning it on needs one reboot. # A machine where a hypervisor already runs (Hyper-V on, or the platform on) is left alone: WHP # works there, and the script changes no Windows setting it does not need. $hv = (Get-CimInstance Win32_ComputerSystem).HypervisorPresent $whp = Get-WindowsOptionalFeature -Online -FeatureName HypervisorPlatform if (-not $hv -and $whp.State -ne 'Enabled') { if ($dry) { Write-Host 'FlashVMM (dry run): would turn on the Windows Hypervisor Platform and ask for a restart'; return } Write-Host 'FlashVMM: turning on the Windows Hypervisor Platform...' Enable-WindowsOptionalFeature -Online -FeatureName HypervisorPlatform -All -NoRestart | Out-Null Write-Host 'FlashVMM: restart Windows, then run the same command again to finish.' -ForegroundColor Yellow return } $arch = if ($env:PROCESSOR_ARCHITECTURE -eq 'ARM64') { 'arm64' } else { 'x64' } $rel = Invoke-RestMethod "$base/bootstrap-windows-$arch.json" if ($rel.msi -notmatch '^flashvm-[0-9.]+-windows-(x64|arm64)\.msi$') { throw "unexpected installer name: $($rel.msi)" } Write-Host "FlashVMM $($rel.version) for Windows $arch" $dir = Join-Path $env:TEMP ('flashvmm-install-' + [guid]::NewGuid().ToString('N')) New-Item -ItemType Directory -Path $dir | Out-Null try { $msi = Join-Path $dir $rel.msi Invoke-WebRequest "$base/$($rel.msi)" -OutFile $msi -UseBasicParsing $sha = (Get-FileHash $msi -Algorithm SHA256).Hash.ToLower() if ($sha -ne $rel.sha256) { throw "checksum mismatch: got $sha, the release says $($rel.sha256)" } if ($dry) { Write-Host "FlashVMM (dry run): $($rel.msi) downloaded, checksum verified; nothing installed"; return } Write-Host 'FlashVMM: checksum verified, installing...' $p = Start-Process msiexec -ArgumentList "/i `"$msi`" /quiet /norestart" -Wait -PassThru if ($p.ExitCode -ne 0 -and $p.ExitCode -ne 3010) { throw "msiexec exited $($p.ExitCode)" } } finally { Remove-Item -Recurse -Force $dir -ErrorAction SilentlyContinue } $flash = Join-Path $env:ProgramFiles 'FlashVM\flash.exe' $env:Path = [Environment]::GetEnvironmentVariable('Path', 'Machine') + ';' + [Environment]::GetEnvironmentVariable('Path', 'User') & $flash self-update --install-timer --interval 15min & $flash --version Write-Host '' Write-Host 'Done. Open a new terminal, then:' -ForegroundColor Green Write-Host ' flash agents setup # your coding agent now runs in its own VM' Write-Host ' flash demo # every feature, one at a time' }