Electron-builder: How to add plugin for nsis package?

Created on 20 Dec 2017  路  8Comments  路  Source: electron-userland/electron-builder


  • Version: 19.49.2

My step:

  • I download the plugin zip
  • unzip and got "Plugins" dir
  • I copy the "Plugins" dir to my custom include file location dir
  • In my custom include file, I add !addplugindir '.\Plugins'
  • use Exec-dosc::exec.
  • throw Error: Plugin not found, cannot call ExecDos::exec

so, how to add plugin correctly?


bug nsis

Most helpful comment

@develar First of all, this shouldn't be closed because it doesn't work. There are multiple issues opened and I'm not sure why no one is trying to fix them.

  1. Putting plugins in the build folder doesn't work.
  2. Also, even if it did, keeping this stuff in the build folder makes no sense because for many people, build folder is an eventual target where production files are built.

So, can you please make an optional flag somewhere in the yml file where we can provide a custom path in which we can keep plugins, includes etc? Would really appreciate the answer on this one and I'm sure, many other people.

All 8 comments

Please put plugin to build/ARCH directory where ARCH it is x86-unicode or x86-ansi.

build dir it is build resources directory.

Please put plugin to build/ARCH directory where ARCH it is x86-unicode or x86-ansi.

build dir it is build resources directory.

I had put plugin into build directory, but still not found the plugin.

Error output:
Plugin not found, cannot call SimpleSC::InstallService

@develar First of all, this shouldn't be closed because it doesn't work. There are multiple issues opened and I'm not sure why no one is trying to fix them.

  1. Putting plugins in the build folder doesn't work.
  2. Also, even if it did, keeping this stuff in the build folder makes no sense because for many people, build folder is an eventual target where production files are built.

So, can you please make an optional flag somewhere in the yml file where we can provide a custom path in which we can keep plugins, includes etc? Would really appreciate the answer on this one and I'm sure, many other people.

This problem blocked me too

PR or donation welcome. Currently I am overwhelmed.

electron-builder cache nsis stuff in AppData, so copy plugins into that dir will work.

Maybe download nsis into the current project build directory is better. It doesn't take much disk space, and convenient to modify installer.

I have the same problem
when I use "script": "setup.nsi" in the electron-builder.json file, the plugin folder is not recognized from build/x86-ansi, its searching for plugins in AppData\Local\electron-builder\Cache\nsis\nsis-3.0.4.1\Pluginsx86-ansi

and when I use "include": "installer.nsh", the plugins are loaded from build/x86-ansi (or x86-unicode)

I tried !addPlugindir with no success

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lbssousa picture lbssousa  路  3Comments

philcockfield picture philcockfield  路  3Comments

alexstrat picture alexstrat  路  3Comments

antonycourtney picture antonycourtney  路  3Comments

NPellet picture NPellet  路  3Comments