Befehle, um MongoDB Tools ohne Rückfragen zu installieren, wieder zu entfernen und in Verteilungswerkzeugen zu erkennen. Ein Befehl erscheint nur, wenn er feststeht: aus dem Manifest oder als dokumentierter Standard der jeweiligen Installer-Technik.
Passende Anleitung: Silent-Install-Parameter: MSI, NSIS, Inno Setup · Programm über Registry oder PowerShell deinstallieren
Mit winget
PowerShell
winget install --id MongoDB.DatabaseTools -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id MongoDB.DatabaseTools -e --silentwinget uninstall --id MongoDB.DatabaseTools -e --silentNach Installer
64-Bit · MSI · Alle Benutzer
Stille Installation
msiexec /i mongodb-database-tools-windows-x86_64-100.20.0.msi /qn /norestartProtokoll schreiben
msiexec /i mongodb-database-tools-windows-x86_64-100.20.0.msi /qn /norestart /l*v "%TEMP%\mongodb-tools-install.log"Deinstallation
msiexec /x {4041DA21-4063-465F-A33C-1A6446C16C69} /qn /norestart- MSI-Produktcode
- {4041DA21-4063-465F-A33C-1A6446C16C69}
- Deinstallationsschlüssel in der Registry
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{4041DA21-4063-465F-A33C-1A6446C16C69}
- UpgradeCode
- {EFFC2F80-8F82-413F-A3BA-4A96F3D2883A}
- Installationsordner
- %ProgramFiles%\MongoDB\Tools\100
PowerShell: herunterladen, prüfen, installieren
Lädt die offizielle Datei herunter, prüft den SHA256-Hash und installiert still.
install-mongodb-tools.ps1
$url = 'https://fastdl.mongodb.org/tools/db/mongodb-database-tools-windows-x86_64-100.20.0.msi'
$sha256 = '7E571463849BF13BF828E39A4F0F437ED2AFA787890E63DAB374D29160EE6D68'
$file = Join-Path $env:TEMP 'mongodb-database-tools-windows-x86_64-100.20.0.msi'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Start-Process msiexec.exe -ArgumentList '/i', ('"{0}"' -f $file), '/qn', '/norestart' -Wait