Commands for installing NASM without prompts, removing it again and detecting it from deployment tools. A command is shown only when it is certain: from the manifest or the installer technology’s documented default.
Related guide: Silent install switches: MSI, NSIS, Inno Setup · Uninstall a program with the registry or PowerShell
With winget
PowerShell
winget install --id NASM.NASM -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id NASM.NASM -e --silentwinget uninstall --id NASM.NASM -e --silentBy installer
64-bit · EXE (NSIS) · All users · en-US
Silent install
nasm-3.02-installer-x64.exe /SCustom folder
nasm-3.02-installer-x64.exe /S /D=C:\Apps\nasm- Install folder
- %ProgramFiles%\NASM
32-bit · EXE (NSIS) · All users · en-US
Silent install
nasm-3.02-installer-x86.exe /SCustom folder
nasm-3.02-installer-x86.exe /S /D=C:\Apps\nasm- Install folder
- %ProgramFiles(x86)%\NASM
PowerShell: download, verify, install
Downloads the official file, checks its SHA256 and installs it silently.
install-nasm.ps1
$url = 'https://www.nasm.us/pub/nasm/releasebuilds/3.02/win64/nasm-3.02-installer-x64.exe'
$sha256 = '0DDB40310861EB29F4D649FEB9466779982A2D251C0DB2B9CF0D21CF591171F3'
$file = Join-Path $env:TEMP 'nasm-3.02-installer-x64.exe'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Start-Process -FilePath $file -ArgumentList '/S' -Wait install-nasm.ps1
$url = 'https://www.nasm.us/pub/nasm/releasebuilds/3.02/win32/nasm-3.02-installer-x86.exe'
$sha256 = '97CBCAEF6A01430AC413EAD0B0E82878A258FAC1C4B37B544A8D96BC21F8136A'
$file = Join-Path $env:TEMP 'nasm-3.02-installer-x86.exe'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Start-Process -FilePath $file -ArgumentList '/S' -Wait