📢 SFTA.exe Latest Update 2020-09-14
Tested in: Windows 8, Windows 8.1, Windows 10 Version 1511, Windows 10 Version 1709, Windows 10 Version 1803, Windows 10 Version 1809, Windows 10 Version 1903, Windows 10 Version 1909, Windows 10 Version 20H2, Windows 11 Pro Version 21H2
Recently one of my clients has asked me to change the default program associated with the extension . pdf to Acrobat Reader DC on Windows 10, all in an automated way. The first thing that comes to mind is to change it through the registry by editing the registry key UserChoice.
Hash entry that is generated automatically by Windows to validate the integrity of file type association.
ProgId entry is the Registered Application Id that handle the file type.
The main problem is that in recent versions of Windows 8/10 This key is protected by a hash associated with the file type, and succeeding in editing it without generating the valid hash the association is automatically restored to the default application.
Doing a quick search on Google I found some ways to do it, using GPO(Group Policy Object) or importing a .xml association file with DISM.exe, but they were a little extensive processes, after a deeper search and taking into account that my client needed a quick fix I found this little command line tool SetUserFTA.exe created by Christoph Kolbicz which complied with what was required and I opted to use momentarily, however I was intrigued to be able to include this method directly in an application developed in another language such as C++, AutoIt, Pascal or PowerShell.
After a couple of days fighting against Windows and doing some Google research, I manage to find the method that uses Windows internally and develop a code to implement in the application of my client.
I developed a small command line tool in PureBasic to perform this task over Windows 8/10 which is very simple to use.
Set Acrobat Reader DC as Default .pdf reader:
SFTA.exe AcroExch.Document.DC .pdf
Set Sumatra PDF as Default .pdf reader:
SFTA.exe Applications\SumatraPDF.exe .pdf
Set Google Chrome as Default for http Protocol :
SFTA.exe ChromeHTML http
I hope this tool will be useful.
All notable changes to this project will be documented in this file.
1.3.1 – 2020-09-14
- Hash Algorithm Raw PureBasic Code
1.3.0 – 2020-04-24
- Add Protocol Support
- Add Icon Support for File Type
1.2.1 – 2019-12-13
- Add –list Show All Application Program Id
- Fix –get command
1.2.0 – 2019-12-12
- Add Hash Algorithm Method to handle the latest Versions of Windows 10
1.1.0 – 2019-08-07
- Add –reg Register Application Program Id
- Add –unreg Unregister Application Program Id
- Add –debug Display Debug Information
- Add Windows 10_1115 Support – Thanks to Mehdi
1.0.0 – 2019-01-22
If you find this useful, a small donation would be greatly appreciated.
- Binance coin
Donate Bitcoin to this address
Scan the QR code or copy the address below into your wallet to send some Bitcoin
Donate Ethereum to this address
Scan the QR code or copy the address below into your wallet to send some Ethereum
Donate Binance coin to this address
Scan the QR code or copy the address below into your wallet to send some Binance coin
Donate Litecoin to this address
Scan the QR code or copy the address below into your wallet to send some Litecoin
Other Method? Contact Us: email@example.com