免互動安裝MemPro、解除安裝,以及在部署工具中偵測安裝狀態所用的指令。只列出確定可用的指令:來自資訊清單,或是安裝程式技術的官方預設參數。
相關教學: 靜默安裝參數總整理:MSI、NSIS、Inno Setup · 用登錄檔或PowerShell解除安裝程式
使用winget
PowerShell
winget install --id PureDevSoftware.MemPro -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id PureDevSoftware.MemPro -e --silentwinget uninstall --id PureDevSoftware.MemPro -e --silent依安裝檔
64位元 · EXE(WiX Burn) · 所有使用者
靜默安裝
download.php /quiet /norestart解除安裝
msiexec /x {41B66AFB-D717-4677-AF3D-7818B72BEBB4} /qn /norestart- MSI產品代碼
- {41b66afb-d717-4677-af3d-7818b72bebb4}
- 解除安裝登錄機碼
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{41b66afb-d717-4677-af3d-7818b72bebb4}
- UpgradeCode
- {AE96D59C-F246-4F90-9562-8C05B7BB79B9}
PowerShell:下載、驗證、安裝
下載官方檔案,驗證SHA256後靜默安裝。
install-mempro.ps1
$url = 'https://www.puredevsoftware.com/download.php?file=MemPro_x64_setup.exe&type=exe'
$sha256 = '3301D23F9DBDBE3023757A44C1864D4AB7FF6CA5FA755A3110470ACFE2AC6898'
$file = Join-Path $env:TEMP 'download.php'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Start-Process -FilePath $file -ArgumentList '/quiet /norestart' -Wait