Ordres per instal·lar mGBA 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 JeffreyPfau.mGBA -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id JeffreyPfau.mGBA -e --silentwinget uninstall --id JeffreyPfau.mGBA -e --silentPer instal·lador
64 bits · EXE (Inno Setup) · Tots els usuaris · en-US
Instal·lació silenciosa
mGBA-0.10.5-win64-installer.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-Una altra carpeta
mGBA-0.10.5-win64-installer.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /DIR="C:\Apps\mgba"- Clau de desinstal·lació al registre
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\mGBA_is1
32 bits · EXE (Inno Setup) · Tots els usuaris · en-US
Instal·lació silenciosa
mGBA-0.10.5-win32-installer.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-Una altra carpeta
mGBA-0.10.5-win32-installer.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /DIR="C:\Apps\mgba"- Clau de desinstal·lació al registre
- HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\mGBA_is1
PowerShell: baixar, verificar, instal·lar
Baixa el fitxer oficial, en comprova l’SHA256 i l’instal·la en mode silenciós.
install-mgba.ps1
$url = 'https://github.com/mgba-emu/mgba/releases/download/0.10.5/mGBA-0.10.5-win64-installer.exe'
$sha256 = 'EDD0454B8FE69F20DC2F0B47F2CFC32A14E3848550762FFBB3D782E649669C6B'
$file = Join-Path $env:TEMP 'mGBA-0.10.5-win64-installer.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 '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' -Wait install-mgba.ps1
$url = 'https://github.com/mgba-emu/mgba/releases/download/0.10.5/mGBA-0.10.5-win32-installer.exe'
$sha256 = '90B19D1D8871E306133C6D428E2C78A9670746815894F370E0E616A7373083D3'
$file = Join-Path $env:TEMP 'mGBA-0.10.5-win32-installer.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 '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' -Wait