免互動安裝NAPS2 Prerelease、解除安裝,以及在部署工具中偵測安裝狀態所用的指令。只列出確定可用的指令:來自資訊清單,或是安裝程式技術的官方預設參數。
相關教學: 靜默安裝參數總整理:MSI、NSIS、Inno Setup · 用登錄檔或PowerShell解除安裝程式
使用winget
PowerShell
winget install --id Cyanfish.NAPS2.Prerelease -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Cyanfish.NAPS2.Prerelease -e --silentwinget uninstall --id Cyanfish.NAPS2.Prerelease -e --silent依安裝檔
64位元 · EXE(Inno Setup) · 所有使用者 · en-US
靜默安裝
naps2-8.0b3-win-x64.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-自訂安裝資料夾
naps2-8.0b3-win-x64.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /DIR="C:\Apps\naps2-prerelease"- 解除安裝登錄機碼
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\NAPS2 - Not Another PDF Scanner_is1
- 安裝資料夾
- %ProgramFiles%\NAPS2
- DisplayVersion
- 8.0.3
64位元 · MSI · 所有使用者 · en-US
靜默安裝
msiexec /i naps2-8.0b3-win-x64.msi /qn /norestart寫入記錄檔
msiexec /i naps2-8.0b3-win-x64.msi /qn /norestart /l*v "%TEMP%\naps2-prerelease-install.log"解除安裝
msiexec /x {F5F02865-3B7D-47A8-9D1B-E3F55DC62787} /qn /norestart- MSI產品代碼
- {F5F02865-3B7D-47A8-9D1B-E3F55DC62787}
- 解除安裝登錄機碼
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{F5F02865-3B7D-47A8-9D1B-E3F55DC62787}
- UpgradeCode
- {FEB82971-B3E6-4F19-9684-1D543E644D73}
- 安裝資料夾
- %ProgramFiles%/NAPS2
- DisplayVersion
- 8.0.3
64位元 · ZIP
免安裝(可攜版)
PowerShell:下載、驗證、安裝
下載官方檔案,驗證SHA256後靜默安裝。
install-naps2-prerelease.ps1
$url = 'https://github.com/cyanfish/naps2/releases/download/v8.0b3/naps2-8.0b3-win-x64.exe'
$sha256 = 'D7B6B966B029F80C879B4224E798F785AF2D5892F23FDB68632462E54F1C040E'
$file = Join-Path $env:TEMP 'naps2-8.0b3-win-x64.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-naps2-prerelease.ps1
$url = 'https://github.com/cyanfish/naps2/releases/download/v8.0b3/naps2-8.0b3-win-x64.msi'
$sha256 = '72BF5809DE136783EF47E764FA3812B35399EF7FF7CC16547F754CFCEDE06847'
$file = Join-Path $env:TEMP 'naps2-8.0b3-win-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' -Wait