PowerShell Set File/Protocol Type Association Default Application Windows 10/11
- Set File Type Association.
- Set Protocol Association.
- Get File Type Association.
- List File Type Association.
- Get Protocol Type Association.
- List Protocol Type Association.
- Register Application.
- Unregister Application.
Get-Help .\SFTA.ps1 -full
Set-FTA AcroExch.Document.DC .pdf
Set-FTA Applications\SumatraPDF.exe .pdf
Set-PTA ChromeHTML http
Register-FTA "C:\SumatraPDF.exe" .pdf -Icon "shell32.dll,100"
powershell -ExecutionPolicy Bypass -command "& { . .\SFTA.ps1; Set-FTA 'MSEdgePDF' '.pdf' }"
powershell -ExecutionPolicy Bypass -command "& { . .\SFTA.ps1; Set-FTA 'Applications\SumatraPDF.exe' '.pdf' }"
Set Sumatra PDF as Default .pdf reader from Windows Command Processor (cmd.exe) (Load Script From GitHub Raw URL):
powershell -ExecutionPolicy Bypass -command "& { [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12;Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/DanysysTeam/PS-SFTA/master/SFTA.ps1'));Set-FTA 'Applications\SumatraPDF.exe' '.pdf' }"
See CHANGELOG.md
Usage is provided under the MIT License.
Copyright © 2022, Danysys.