-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Windows 8.1 .js file association does not allow passing arguments #9338
Comments
I don't think the installer does that. Are you sure you didn't add it yourself in the first place? |
That may be true :( - I did mess up my settings and had Windows automatically associate it. Let me try to undo that damage and see if it fixes this issue. |
So I reverted to the default, which seems to be .js files are run in wscript.exe. I then reinstalled Node.js, but the association has not changed to Node.js. Is this by design? I assumed Node.js would associate with .js files, so you can easily run them from the command-line. |
Hah. I was trying this on my second display to see if it worked and I got scared to death when my editor popped up on the other display. (So I also don't think the installer does something like this.) Though, the installer can ask if we want a "Run with Node" option in the context menu, just like Sublime Text does. I would say yes to that. You should close this issue and create a new one as a suggestion. Don't forget to reference it here. |
I think that association has two meanings:
There are some risks to setting it though, as WSH is still in use and we could break other things by setting that association. For the first case, I think silent mode execution would be preferred, there is some discussion about that in nodejs/node#556. |
Opened a feature request |
Problem
It seems that the Node.js x64 0.12.0 installation on Windows 8.1 adds the following file association with ".js" files to the registry:
Unfortunately, this does not allow passing arguments to the script:
Proposed fix
This is easily fixed by modifying the association and add "%*" like so:
Now if I run the same test, it works as expected:
The text was updated successfully, but these errors were encountered: