免互動安裝dnGREP、解除安裝,以及在部署工具中偵測安裝狀態所用的指令。只列出確定可用的指令:來自資訊清單,或是安裝程式技術的官方預設參數。
相關教學: 靜默安裝參數總整理:MSI、NSIS、Inno Setup · 用登錄檔或PowerShell解除安裝程式
使用winget
PowerShell
winget install --id dnGrep.dnGrep -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id dnGrep.dnGrep -e --silentwinget uninstall --id dnGrep.dnGrep -e --silent依安裝檔
64位元 · MSI · 所有使用者 · en-US
靜默安裝
msiexec /i dnGREP.5.0.65.x64.msi /qn /norestart /quiet寫入記錄檔
msiexec /i dnGREP.5.0.65.x64.msi /qn /norestart /quiet /l*v "%TEMP%\dngrep-install.log"解除安裝
msiexec /x {C6962139-E95D-4FBC-B631-11EAD564A419} /qn /norestart- MSI產品代碼
- {C6962139-E95D-4FBC-B631-11EAD564A419}
- 解除安裝登錄機碼
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{C6962139-E95D-4FBC-B631-11EAD564A419}
- UpgradeCode
- {4CF55558-B642-482E-9FBF-06EA5AEC8276}
- 安裝資料夾
- %ProgramFiles%/./dnGrep
ARM64 · MSI · 所有使用者 · en-US
靜默安裝
msiexec /i dnGREP.5.0.65.ARM64.msi /qn /norestart /quiet寫入記錄檔
msiexec /i dnGREP.5.0.65.ARM64.msi /qn /norestart /quiet /l*v "%TEMP%\dngrep-install.log"解除安裝
msiexec /x {40623AA8-BFB1-4171-8377-9DA74747AE1D} /qn /norestart- MSI產品代碼
- {40623AA8-BFB1-4171-8377-9DA74747AE1D}
- 解除安裝登錄機碼
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{40623AA8-BFB1-4171-8377-9DA74747AE1D}
- UpgradeCode
- {4CF55558-B642-482E-9FBF-06EA5AEC8276}
- 安裝資料夾
- %ProgramFiles%/./dnGrep
32位元 · MSI · 所有使用者 · en-US
靜默安裝
msiexec /i dnGREP.5.0.65.x86.msi /qn /norestart /quiet寫入記錄檔
msiexec /i dnGREP.5.0.65.x86.msi /qn /norestart /quiet /l*v "%TEMP%\dngrep-install.log"解除安裝
msiexec /x {42A587F6-00E4-4638-841A-C11C89E1E21C} /qn /norestart- MSI產品代碼
- {42A587F6-00E4-4638-841A-C11C89E1E21C}
- 解除安裝登錄機碼
- HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{42A587F6-00E4-4638-841A-C11C89E1E21C}
- UpgradeCode
- {4CF55558-B642-482E-9FBF-06EA5AEC8276}
- 安裝資料夾
- %ProgramFiles(x86)%/./dnGrep
PowerShell:下載、驗證、安裝
下載官方檔案,驗證SHA256後靜默安裝。
install-dngrep.ps1
$url = 'https://github.com/dnGrep/dnGrep/releases/download/v5.0.65.0/dnGREP.5.0.65.x64.msi'
$sha256 = '200A100F499ABC89A2A332DBB14D65728C7B851A80ABFD8B13DA67E6C68F836F'
$file = Join-Path $env:TEMP 'dnGREP.5.0.65.x64.msi'
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', '/quiet' -Wait install-dngrep.ps1
$url = 'https://github.com/dnGrep/dnGrep/releases/download/v5.0.65.0/dnGREP.5.0.65.ARM64.msi'
$sha256 = '4E763865725AB727B9AD01D077F252400A271A061AC28A259A019BA9A2318FB0'
$file = Join-Path $env:TEMP 'dnGREP.5.0.65.ARM64.msi'
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', '/quiet' -Wait install-dngrep.ps1
$url = 'https://github.com/dnGrep/dnGrep/releases/download/v5.0.65.0/dnGREP.5.0.65.x86.msi'
$sha256 = 'B832B549F4461CE3263550540070C72827F76124BB06D5AA899EE906F8F95F52'
$file = Join-Path $env:TEMP 'dnGREP.5.0.65.x86.msi'
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', '/quiet' -Wait