You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have verified this is the correct repository for opening this issue.
I have verified no other issues exist related to my problem.
I have verified this is not an issue for a specific package.
I have verified this issue is not security related.
I confirm I am using official, and not unofficial, or modified, Chocolatey products.
What You Are Seeing?
The value being created by Install-ChocolateyFileAssociation at HKEY_CLASSES_ROOT\infekt-win64.exe\Shell\Open\Command\ has one too many parameters ("path\to\exe" "%1" "%*" vs "path\to\exe" "%1"). This is causing the app to throw a "too many positional options have been specified" error when opening associated files.
What is Expected?
.nfo files should be able to open in the app without issue
How Did You Get This To Happen?
Here's part of the chocolateyInstall.ps1—hopefully enough to reproduce:
@mica Can you go back amend your description above to include:
Full reproducible steps for this in the 'How did you get this to happen'? Note that those steps must include everything that we need to do to reproduce it.
Include the output you are seeing with the error message and the output from Chocolatey CLI when install the package in the 'Output Log' section above.
Without both of those we cannot look at this issue.
Not sure how relevant it would be, as the error is within another program—one that just happens to crash if passed a third parameter, even when it's an empty string. For example, & .\infekt-win64.exe file.txt works fine, whereas & .\infekt-win64.exe file.txt "" doesn't.
The issue is that in line 78 of Install-ChocolateyFileAssociation.ps1, it's registering $fileType="$executable" "%1" "%*" where $fileType="$executable" "%1" would suffice.
mica
changed the title
Install-ChocolateyFileAssociation 3rd parameter in registry command causing error when opening file
Install-ChocolateyFileAssociation creating unnecessary 3rd parameter in registry command, causing error in app when opening associated filetype
May 19, 2024
Checklist
What You Are Seeing?
The value being created by
Install-ChocolateyFileAssociation
atHKEY_CLASSES_ROOT\infekt-win64.exe\Shell\Open\Command\
has one too many parameters ("path\to\exe" "%1" "%*"
vs"path\to\exe" "%1"
). This is causing the app to throw a "too many positional options have been specified" error when opening associated files.What is Expected?
.nfo files should be able to open in the app without issue
How Did You Get This To Happen?
Here's part of the chocolateyInstall.ps1—hopefully enough to reproduce:
You can create an empty .nfo text file and attempt to open it to reproduce the error message.
Then if you edit the value at
HKEY_CLASSES_ROOT\infekt-win64.exe\Shell\Open\Command\
, removing"%*"
, it will open fine.System Details
The text was updated successfully, but these errors were encountered: