免互動安裝Notepad++、解除安裝,以及在部署工具中偵測安裝狀態所用的指令。只列出確定可用的指令:來自資訊清單,或是安裝程式技術的官方預設參數。
相關教學: 靜默安裝參數總整理:MSI、NSIS、Inno Setup · 用登錄檔或PowerShell解除安裝程式
使用winget
PowerShell
winget install --id Notepad++.Notepad++ -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Notepad++.Notepad++ -e --silentwinget uninstall --id Notepad++.Notepad++ -e --silent依安裝檔
64位元 · EXE(NSIS) · 所有使用者
靜默安裝
npp.8.9.8.1.Installer.x64.exe /S自訂安裝資料夾
npp.8.9.8.1.Installer.x64.exe /S /D=C:\Apps\notepad-plus-plus- 解除安裝登錄機碼
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Notepad++
- 安裝資料夾
- %ProgramFiles%\Notepad++
64位元 · MSI · 所有使用者
靜默安裝
msiexec /i npp.8.9.8.1.Installer.x64.msi /qn /norestart寫入記錄檔
msiexec /i npp.8.9.8.1.Installer.x64.msi /qn /norestart /l*v "%TEMP%\notepad-plus-plus-install.log"解除安裝
msiexec /x {5C6F8543-7EA8-40B9-B78F-04C78300DE7F} /qn /norestart- MSI產品代碼
- {5C6F8543-7EA8-40B9-B78F-04C78300DE7F}
- 解除安裝登錄機碼
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{5C6F8543-7EA8-40B9-B78F-04C78300DE7F}
- UpgradeCode
- {CDB13460-04DF-4708-A7FD-4CB4A0684605}
64位元 · ZIP
免安裝(可攜版)
ARM64 · EXE(NSIS) · 所有使用者
靜默安裝
npp.8.9.8.1.Installer.arm64.exe /S自訂安裝資料夾
npp.8.9.8.1.Installer.arm64.exe /S /D=C:\Apps\notepad-plus-plus- 解除安裝登錄機碼
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Notepad++
- 安裝資料夾
- %ProgramFiles%\Notepad++
ARM64 · ZIP
免安裝(可攜版)
32位元 · EXE(NSIS) · 所有使用者
靜默安裝
npp.8.9.8.1.Installer.exe /S自訂安裝資料夾
npp.8.9.8.1.Installer.exe /S /D=C:\Apps\notepad-plus-plus- 解除安裝登錄機碼
- HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Notepad++
- 安裝資料夾
- %ProgramFiles(x86)%\Notepad++
32位元 · ZIP
免安裝(可攜版)
PowerShell:下載、驗證、安裝
下載官方檔案,驗證SHA256後靜默安裝。
install-notepad-plus-plus.ps1
$url = 'https://github.com/notepad-plus-plus/notepad-plus-plus/releases/download/v8.9.8.1/npp.8.9.8.1.Installer.x64.exe'
$sha256 = '26F3BCCED788FADBAC4E7E577B430EA2CE6060CF3BCAD993EF4612ECD7D743DA'
$file = Join-Path $env:TEMP 'npp.8.9.8.1.Installer.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 '/S' -Wait install-notepad-plus-plus.ps1
$url = 'https://github.com/notepad-plus-plus/notepad-plus-plus/releases/download/v8.9.8.1/npp.8.9.8.1.Installer.x64.msi'
$sha256 = '0C4F4FE82BABD7688F5C1431B1357392491563AF6FFEDF4E37F5DE0BD71BABB4'
$file = Join-Path $env:TEMP 'npp.8.9.8.1.Installer.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 install-notepad-plus-plus.ps1
$url = 'https://github.com/notepad-plus-plus/notepad-plus-plus/releases/download/v8.9.8.1/npp.8.9.8.1.Installer.arm64.exe'
$sha256 = 'A53C5116B55AC93FEDD7808E71096BADECBF10A55F2BE9B28B741591B8917A73'
$file = Join-Path $env:TEMP 'npp.8.9.8.1.Installer.arm64.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 '/S' -Wait install-notepad-plus-plus.ps1
$url = 'https://github.com/notepad-plus-plus/notepad-plus-plus/releases/download/v8.9.8.1/npp.8.9.8.1.Installer.exe'
$sha256 = 'EE848AA54DF153921678B343857A83861DA81CE0C9DBB217B6F55A8780E60F5E'
$file = Join-Path $env:TEMP 'npp.8.9.8.1.Installer.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 '/S' -Wait