Ordres per instal·lar Code::Blocks with MinGW 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
winget install --id CodeBlocks.CodeBlocks.MinGW -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id CodeBlocks.CodeBlocks.MinGW -e --silentwinget uninstall --id CodeBlocks.CodeBlocks.MinGW -e --silentPer instal·lador
64 bits · EXE (NSIS) · Tots els usuaris · en-US
download /Sdownload /S /D=C:\Apps\code-blocks-with-mingw- Clau de desinstal·lació al registre
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\CodeBlocks
- Carpeta d’instal·lació
- %ProgramFiles%\CodeBlocks
64 bits · ZIP
No cal instal·lar-lo (portable)
32 bits · EXE (NSIS) · Tots els usuaris · en-US
download /Sdownload /S /D=C:\Apps\code-blocks-with-mingw- Clau de desinstal·lació al registre
- HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\CodeBlocks
- Carpeta d’instal·lació
- %ProgramFiles(x86)%\CodeBlocks
32 bits · ZIP
No cal instal·lar-lo (portable)
PowerShell: baixar, verificar, instal·lar
Baixa el fitxer oficial, en comprova l’SHA256 i l’instal·la en mode silenciós.
$url = 'https://sourceforge.net/projects/codeblocks/files/Binaries/25.03/Windows/codeblocks-25.03mingw-setup.exe/download'
$sha256 = '8712227526EB3BB26C90DD5C78301B3FA32BF5869A43294BBF4E9C5512C52792'
$file = Join-Path $env:TEMP 'download'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Start-Process -FilePath $file -ArgumentList '/S' -Wait $url = 'https://sourceforge.net/projects/codeblocks/files/Binaries/25.03/Windows/32bit/codeblocks-25.03mingw-32bit-setup.exe/download'
$sha256 = '7830E8E19B3EEC2657B931B52F417DBBF55CADC3D9DFE21151DB058994F54DF6'
$file = Join-Path $env:TEMP 'download'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Start-Process -FilePath $file -ArgumentList '/S' -Wait