Commands for installing NVIDIA CUDA Toolkit 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 Nvidia.CUDA -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Nvidia.CUDA -e --silentwinget uninstall --id Nvidia.CUDA -e --silentBy installer
64-bit · EXE · All users
Silent install
cuda_13.4.1_windows_x86_64.exe -y -gm2 -s -n- Uninstall registry key
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{B2FE1952-0186-46C3-BAEC-A80AA35AC5B8}_CUDAToolkit_13.4
PowerShell: download, verify, install
Downloads the official file, checks its SHA256 and installs it silently.
install-nvidia-cuda-toolkit.ps1
$url = 'https://developer.download.nvidia.com/compute/cuda/13.4.1/local_installers/cuda_13.4.1_windows_x86_64.exe'
$sha256 = '632A5912995473CEA77B24788715B8D94DB17A94CFEA102A12F72C3614FE8C7E'
$file = Join-Path $env:TEMP 'cuda_13.4.1_windows_x86_64.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 '-y -gm2 -s -n' -Wait