electron builder fileAssociations does not take effect

electron builder fileAssociations does not take effect

Reasons why fileAssociations configuration does not take effect

It is a window permission problem. Because of the permission problem, the configuration related to fileAssociations in the window is blocked.

Solution

Set perMachine in the nsis configuration to false (which is the default value).

nsis: {
    
     //nsis安装器配置
    oneClick: false, // 是否需要点击安装,自动更新需要关掉
    allowToChangeInstallationDirectory:true, //是否能够选择安装路径
    perMachine: false
},
fileAssociations: {
    
    
    ext: ["md","markdown","mmd","mdown","mdtxt","mdtext"],
    name: "Markdown",
    description: "Markdown document",
    icon: "./resource/icons/md.png"
},

Analysis of related issues on GitHub

Must be error if file association is set, but perMachine not · Issue #772 · electron-userland/electron-builder (github.com)

Guess you like

Origin blog.csdn.net/qq_43203949/article/details/128322634