免互動安裝Folder Size、解除安裝,以及在部署工具中偵測安裝狀態所用的指令。只列出確定可用的指令:來自資訊清單,或是安裝程式技術的官方預設參數。
相關教學: 靜默安裝參數總整理:MSI、NSIS、Inno Setup · 用登錄檔或PowerShell解除安裝程式
使用winget
PowerShell
winget install --id Brio.FolderSize -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Brio.FolderSize -e --silentwinget uninstall --id Brio.FolderSize -e --silent依安裝檔
64位元 · MSI · 所有使用者
靜默安裝
msiexec /i download /qn /norestart寫入記錄檔
msiexec /i download /qn /norestart /l*v "%TEMP%\folder-size-install.log"解除安裝
msiexec /x {F24FF688-7138-4CCF-A83F-71E9FB01170E} /qn /norestart- MSI產品代碼
- {F24FF688-7138-4CCF-A83F-71E9FB01170E}
- 解除安裝登錄機碼
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{F24FF688-7138-4CCF-A83F-71E9FB01170E}
32位元 · MSI · 所有使用者
靜默安裝
msiexec /i download /qn /norestart寫入記錄檔
msiexec /i download /qn /norestart /l*v "%TEMP%\folder-size-install.log"解除安裝
msiexec /x {FC8D21C8-7B29-4104-ADB0-FEE9CA1C7922} /qn /norestart- MSI產品代碼
- {FC8D21C8-7B29-4104-ADB0-FEE9CA1C7922}
- 解除安裝登錄機碼
- HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{FC8D21C8-7B29-4104-ADB0-FEE9CA1C7922}
PowerShell:下載、驗證、安裝
下載官方檔案,驗證SHA256後靜默安裝。
install-folder-size.ps1
$url = 'https://sourceforge.net/projects/foldersize/files/foldersize/2.6/FolderSize-2.6-x64.msi/download'
$sha256 = '76A5FE05214D9669E09B3DF6FDE80646700B27CB73B1D1FF23066660813A77EC'
$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 msiexec.exe -ArgumentList '/i', ('"{0}"' -f $file), '/qn', '/norestart' -Wait install-folder-size.ps1
$url = 'https://sourceforge.net/projects/foldersize/files/foldersize/2.6/FolderSize-2.6-x86.msi/download'
$sha256 = '8D01E67B69FDE230DA3654B8755326A0E38001A1BF7CF98C89B1B2BA1F544F74'
$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 msiexec.exe -ArgumentList '/i', ('"{0}"' -f $file), '/qn', '/norestart' -Wait