DanysysTeam / PS-SFTA

PowerShell Set File Type Association
253 stars 53 forks source link

When there is a space in the path to exe, `Register-FTA` doesn't work #20

Closed SerVB closed 1 year ago

SerVB commented 1 year ago

There is an error logged that Test-Path $_ fails when I call Register-FTA with a path with spaces, like Register-FTA "C:\my path\app.exe" .abc.

Anyway, thank you for the repo!

Danyfirex commented 1 year ago

I don't get that issue. I'm using like this: powershell -ExecutionPolicy Bypass -command "& { . .\SFTA.ps1; Register-FTA 'C:\Folder Space\Msgbox.exe' '.abc' }"

I also do it like this: . .\SFTA.ps1

then: Register-FTA "C:\Folder Space\Msgbox.exe" .abc -verbose

and all fine. Show me a runnable code to reproduce the issue.

SerVB commented 1 year ago

Thanks! I rechecked and it works for me now. I don't know why it didn't work two weeks ago for me because I did the same actions. Sorry for bothering. Closing.