Ordres per instal·lar MapTool sense preguntes, desinstal·lar-lo i detectar-lo des d’eines de desplegament. Només es mostra una ordre quan és segura: la que indica el manifest o el valor per defecte documentat de la tecnologia de l’instal·lador.
Guia relacionada: Instal·lació silenciosa: MSI, NSIS, Inno Setup · Desinstal·lar un programa amb el registre o PowerShell
Amb winget
PowerShell
winget install --id RPTools.MapTool -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id RPTools.MapTool -e --silentwinget uninstall --id RPTools.MapTool -e --silentPer instal·lador
64 bits · MSI · Tots els usuaris
Instal·lació silenciosa
msiexec /i MapTool-1.18.7.msi /qn /norestartDesar un registre
msiexec /i MapTool-1.18.7.msi /qn /norestart /l*v "%TEMP%\maptool-install.log"Desinstal·lar
msiexec /x {60EDB76E-EBB2-30C5-9730-F6FB76C2B0D8} /qn /norestart- Codi de producte MSI
- {60EDB76E-EBB2-30C5-9730-F6FB76C2B0D8}
- Clau de desinstal·lació al registre
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{60EDB76E-EBB2-30C5-9730-F6FB76C2B0D8}
- UpgradeCode
- {74D934B9-5FB5-433E-ACA4-C6F14BD9AA6B}
- Carpeta d’instal·lació
- %ProgramFiles%/MapTool
PowerShell: baixar, verificar, instal·lar
Baixa el fitxer oficial, en comprova l’SHA256 i l’instal·la en mode silenciós.
install-maptool.ps1
$url = 'https://github.com/RPTools/maptool/releases/download/1.18.7/MapTool-1.18.7.msi'
$sha256 = 'E10DA06CBF7758047F085D788608D2E52D0CC95137F376109CA54F29BF3BA529'
$file = Join-Path $env:TEMP 'MapTool-1.18.7.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