免互動安裝GNU Midnight Commander、解除安裝,以及在部署工具中偵測安裝狀態所用的指令。只列出確定可用的指令:來自資訊清單,或是安裝程式技術的官方預設參數。
相關教學: 靜默安裝參數總整理:MSI、NSIS、Inno Setup · 用登錄檔或PowerShell解除安裝程式
使用winget
PowerShell
winget install --id GNU.MidnightCommander -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id GNU.MidnightCommander -e --silentwinget uninstall --id GNU.MidnightCommander -e --silent依安裝檔
64位元 · EXE(Inno Setup) · 所有使用者 · en-US
靜默安裝
mcwin32-build236-x64-setup.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-自訂安裝資料夾
mcwin32-build236-x64-setup.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /DIR="C:\Apps\gnu-midnight-commander"- 解除安裝登錄機碼
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{CBB4464D-7081-4F1D-9F6D-F5288A4A9B82}_is1
- 安裝資料夾
- %ProgramFiles%\Midnight Commander
- DisplayVersion
- 4.8.33 (build: 20250808-236)
32位元 · EXE(Inno Setup) · 所有使用者 · en-US
靜默安裝
mcwin32-build236-setup.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-自訂安裝資料夾
mcwin32-build236-setup.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /DIR="C:\Apps\gnu-midnight-commander"- 解除安裝登錄機碼
- HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{CBB4464D-7081-4F1D-9F6D-F5288A4A9B82}_is1
- 安裝資料夾
- %ProgramFiles%\Midnight Commander
- DisplayVersion
- 4.8.33 (build: 20250808-236)
PowerShell:下載、驗證、安裝
下載官方檔案,驗證SHA256後靜默安裝。
install-gnu-midnight-commander.ps1
$url = 'https://github.com/adamyg/mcwin32/releases/download/4.8.33.236/mcwin32-build236-x64-setup.exe'
$sha256 = 'C7EDF10402542D334DF7E6FF802E2213D384EAFA949A6FA88D3813BD87A8EE04'
$file = Join-Path $env:TEMP 'mcwin32-build236-x64-setup.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-gnu-midnight-commander.ps1
$url = 'https://github.com/adamyg/mcwin32/releases/download/4.8.33.236/mcwin32-build236-setup.exe'
$sha256 = '023FA2F8F4CAD2D9D793D0ABCA208F2957B03DB8B0651A1AF355B4B4ECB936E4'
$file = Join-Path $env:TEMP 'mcwin32-build236-setup.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