Commands for installing Python 3.7 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 Python.Python.3.7 -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Python.Python.3.7 -e --silentwinget uninstall --id Python.Python.3.7 -e --silentBy installer
64-bit · EXE (WiX Burn) · Current user
Silent install
python-3.7.9-amd64.exe /quiet /norestartUninstall
msiexec /x {9DF6F8E6-72F4-474F-A929-37485BB7537E} /qn /norestart- MSI product code
- {9df6f8e6-72f4-474f-a929-37485bb7537e}
- Uninstall registry key
- HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{9df6f8e6-72f4-474f-a929-37485bb7537e}
- UpgradeCode
- {71010FC2-A70A-5D7A-AA83-DC4282DCFE02}
- DisplayVersion
- 3.7.9150.0
64-bit · EXE (WiX Burn) · All users
Silent install
python-3.7.9-amd64.exe /quiet /norestartUninstall
msiexec /x {9DF6F8E6-72F4-474F-A929-37485BB7537E} /qn /norestart- MSI product code
- {9df6f8e6-72f4-474f-a929-37485bb7537e}
- Uninstall registry key
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{9df6f8e6-72f4-474f-a929-37485bb7537e}
- UpgradeCode
- {71010FC2-A70A-5D7A-AA83-DC4282DCFE02}
- DisplayVersion
- 3.7.9150.0
32-bit · EXE (WiX Burn) · Current user
Silent install
python-3.7.9.exe /quiet /norestartUninstall
msiexec /x {D0F4B802-4C35-43A7-B0B9-F1CBDB3675EC} /qn /norestart- MSI product code
- {d0f4b802-4c35-43a7-b0b9-f1cbdb3675ec}
- Uninstall registry key
- HKCU\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{d0f4b802-4c35-43a7-b0b9-f1cbdb3675ec}
- UpgradeCode
- {5C464E87-58D7-5592-B004-12ED93D23716}
- DisplayVersion
- 3.7.9150.0
32-bit · EXE (WiX Burn) · All users
Silent install
python-3.7.9.exe /quiet /norestartUninstall
msiexec /x {D0F4B802-4C35-43A7-B0B9-F1CBDB3675EC} /qn /norestart- MSI product code
- {d0f4b802-4c35-43a7-b0b9-f1cbdb3675ec}
- Uninstall registry key
- HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{d0f4b802-4c35-43a7-b0b9-f1cbdb3675ec}
- UpgradeCode
- {5C464E87-58D7-5592-B004-12ED93D23716}
- DisplayVersion
- 3.7.9150.0
PowerShell: download, verify, install
Downloads the official file, checks its SHA256 and installs it silently.
install-python-3-7.ps1
$url = 'https://www.python.org/ftp/python/3.7.9/python-3.7.9-amd64.exe'
$sha256 = 'E69ED52AFB5A722E5C56F6C21D594E85C17CB29F12F18BB69751CF1714E0F987'
$file = Join-Path $env:TEMP 'python-3.7.9-amd64.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 '/quiet /norestart' -Wait install-python-3-7.ps1
$url = 'https://www.python.org/ftp/python/3.7.9/python-3.7.9-amd64.exe'
$sha256 = 'E69ED52AFB5A722E5C56F6C21D594E85C17CB29F12F18BB69751CF1714E0F987'
$file = Join-Path $env:TEMP 'python-3.7.9-amd64.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 '/quiet /norestart' -Wait install-python-3-7.ps1
$url = 'https://www.python.org/ftp/python/3.7.9/python-3.7.9.exe'
$sha256 = '769BB7C74AD1DF6D7D74071CC16A984FF6182E4016E11B8949B93DB487977220'
$file = Join-Path $env:TEMP 'python-3.7.9.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 '/quiet /norestart' -Wait install-python-3-7.ps1
$url = 'https://www.python.org/ftp/python/3.7.9/python-3.7.9.exe'
$sha256 = '769BB7C74AD1DF6D7D74071CC16A984FF6182E4016E11B8949B93DB487977220'
$file = Join-Path $env:TEMP 'python-3.7.9.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 '/quiet /norestart' -Wait