/PS-SFTA

PowerShell Set File Type Association

Primary LanguagePowerShell

PowerShell SFTA

Latest Version MIT License Made with Love

PowerShell Set File/Protocol Type Association Default Application Windows 10

Features

  • 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.

Usage

Type Get-Help command for information
Get-Help .\SFTA.ps1 -full

Basic Usage

Set Acrobat Reader DC as Default .pdf reader:
Set-FTA AcroExch.Document.DC .pdf
Set Sumatra PDF as Default .pdf reader:
Set-FTA Applications\SumatraPDF.exe .pdf
Set Google Chrome as Default for http Protocol:
Set-PTA ChromeHTML http
Register Application and Set as Default for .pdf reader:
Register-FTA "C:\SumatraPDF.exe" .pdf -Icon "shell32.dll,100"

Additional Instructions

Set Sumatra PDF as Default .pdf reader from Windows Command Processor (cmd.exe):
powershell -ExecutionPolicy Bypass -command "& { . .\SFTA.ps1; Set-FTA 'Applications\SumatraPDF.exe' '.pdf' }"

Release History

See CHANGELOG.md

License

Usage is provided under the MIT License.

Copyright © 2021, Danysys.