Commands for installing XmlNotepad without prompts, removing it again and detecting it from deployment tools. A command is shown only when it is certain: from the manifest or the installer technology’s documented default.
Related guide: Silent install switches: MSI, NSIS, Inno Setup · Uninstall a program with the registry or PowerShell
With winget
PowerShell
winget install --id Microsoft.XMLNotepad -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Microsoft.XMLNotepad -e --silentwinget uninstall --id Microsoft.XMLNotepad -e --silentBy installer
Any CPU · MSIX
Silent install
Add-AppxPackage -Path XmlNotepadPackage_2.9.0.22_AnyCPU.msixbundleUninstall
Get-AppxPackage -Name 43906ChrisLovett.XmlNotepad | Remove-AppxPackageAny CPU · ZIP
Silent install
msiexec /i XmlNotepadSetup.zip /qn /norestartUninstall
msiexec /x {28D9664A-4963-4FDC-A2E2-00925C4A0AE7} /qn /norestart- MSI product code
- {28D9664A-4963-4FDC-A2E2-00925C4A0AE7}
- Uninstall registry key
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{28D9664A-4963-4FDC-A2E2-00925C4A0AE7}
- UpgradeCode
- {14C1B5E8-3198-4AF2-B4BC-351017A109D3}
PowerShell: download, verify, install
Downloads the official file, checks its SHA256 and installs it silently.
install-xmlnotepad.ps1
$url = 'https://github.com/microsoft/XmlNotepad/releases/download/2.9.0.22/XmlNotepadPackage_2.9.0.22_AnyCPU.msixbundle'
$sha256 = '9CBAFE9E930C23BC8AD0D77F7A7DF2FA2A21F08FC79F24B6BC12943C1282587A'
$file = Join-Path $env:TEMP 'XmlNotepadPackage_2.9.0.22_AnyCPU.msixbundle'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Add-AppxPackage -Path $file install-xmlnotepad.ps1
$url = 'https://github.com/microsoft/XmlNotepad/releases/download/2.9.0.22/XmlNotepadSetup.zip'
$sha256 = '34E04B10EF0C208D98F2BFA587B540D26EDAEA86AC9EC7A9A41A2DBD7AF475DA'
$file = Join-Path $env:TEMP 'XmlNotepadSetup.zip'
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