question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Help needed with file association

See original GitHub issue

Electron-builder: 10.17.3 Target: Windows 10

Hi there. I’m trying to use the fileAssociations option. First, this is how the code in the package.json is formed

  "build": {
    "win": {
      "target": [
        "nsis",
        "squirrel"
      ]
    }
  },
  "fileAssociations": [
    {
      "ext": [".mp3", ".wmv", ".wav", ".ogg"],
      "description": "Music file extension",
      "role": "none"
    }
  ],
  "nsis": {
    "perMachine": true
  },

It works fine, I mean, It doesn’t throws me any error. But!, when I install the app, there is no file associated to the app. I can choose Open with and and I do click over a mp3 file, the app is launched. If this is the behavior, sorry and there’s not an issue.

Secondly - this is a doubt -, when the app is launched by a file, how I can catch the path fo the file or the event emitted of being opened by the file. Thanks a lot for your time

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
develarcommented, Apr 5, 2017

Electron-builder: 10.17.3

Please update to latest version.

0reactions
sytolkcommented, Jan 4, 2021

I have an other question… if app is started from file association like electron-app /file/path.. how can I start App with an other param like electron-app --my-custom-parm -> this will be parsed like file path. It’s much better to have additional parameter for file association only like electron-app -open=/file/path.. Now I needs to catch and exclude any additional parameters from different sources like testing with spectron: --user-data-dir --use-mock-keychain

Read more comments on GitHub >

github_iconTop Results From Across the Web

File Association Helper in Windows 10, 11 - DiskInternals
File Association Helper is a third-party free software that can be found in the Start Menu on computers running Windows XP through Windows...
Read more >
File Association Helper: What is it and how to remove it
1. Uninstall File Association Helper via Control Panel · 2. Use a dedicated tool to remove software leftovers · 3. Clean the Registry...
Read more >
How to Change File Associations in Windows 10 | Digital Trends
1. Right-click on a file of the type you wish to change the association for. 2. Select Open With from the resulting menu....
Read more >
Change the file association for an email attachment
In the Set Associations tool, select the file type you want to change the program for, then choose Change program. Once you've chosen...
Read more >
How to associate a file with a program in Windows
Associate one file with a specific program · Right-click the file you want to change the file association and select Properties in the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found