DanysysTeam / PS-SFTA

PowerShell Set File Type Association
253 stars 53 forks source link

"SFTA." prepended unintentionally to ProgId #23

Closed igorakkerman closed 1 year ago

igorakkerman commented 1 year ago

This might be a very niche case, but it actually happened to me.

I tried to register VSCode for Powershell files (.ps1) and kept getting ProgId SFTA.VSCode.ps1 as UserChoice, instead of VSCode.ps1. After some investigation in the code, I realized that this happened because, ironically, my script was named vscode.ps1. PS-SFTA checked for the existence of a file of that name and thus prepended SFTA..

I don't know whether this should be fixed or not but it took me some time to figure out the strange behavior. In the end, it's quite funny, I must admit.

Danyfirex commented 1 year ago

Hello, Could you share the whole command You were using.

igorakkerman commented 1 year ago

Hi, thanks for your reply. Sure, the command was simply:

Set-FTA -ProgId "VSCode.ps1" -Extension ".ps1"
Danyfirex commented 1 year ago

That's a really niche case. I will not mark it as an issue. I'll close the issue. But It's great you posted here. It will help someone for sure.