title: Electron-Builder cannot build update for Windows
body: <p>I am not able to build an update with Electron-Builder and Squirrel for a test application. The problem I think Wine does not find the 7z.exe file. Here's a part of the error that I think is the main problem:</p>
  
  <pre><code>Utility: Failed to extract file /Users/&lt;user&gt;/developer/electron-examples/installer-and-auto-update/dist/squirrel-windows/electronquickstart-1.0.0-full.nupkg to /Users/&lt;user&gt;/.local/share/SquirrelTemp/tempa
  wine: cannot find L"C:\\windows\\system32\\.7z.exe"
  </code></pre>
  
  <p>I tried installing 7-Zip x64 and x86. I even tried to install it in c:/ windows/system32/.</p>
  
  <p>Building for Windows on macOS.</p>
  
  <p><strong>package.json</strong></p>
  
  <pre><code>{
    "name": "electronquickstart",
    "version": "1.0.1",
    "description": "A minimal Electron application",
    "main": "./app/main.js",
    "scripts": {
      "start": "electron .",
      "dist": "build -w --x64"
    },
    "repository": "",
    "keywords": [
      "Electron",
      "quick",
      "start",
      "tutorial",
      "demo"
    ],
    "author": "GitHub",
    "license": "CC0-1.0",
    "devDependencies": {
      "electron": "~1.7.8",
      "electron-builder": "^19.49.2",
      "electron-builder-squirrel-windows": "^19.49.0"
    },
    "build": {
      "appId": "com.domain.test",
      "copyright": "Copyright © 2017 Company",
      "productName": "Teste",
      "electronVersion": "1.7.8",
      "win": {
        "target": [
          "squirrel"
        ],
        "certificateFile": "./certificate/certificate.pfx",
        "certificatePassword": "password00",
        "icon": "./build/icon.ico"
      },
      "squirrelWindows": {
        "remoteReleases": "http://example.com/installer/",
        "iconUrl": "http://example.com/favicon.ico",
        "useAppIdAsId": false
      }
    },
    "dependencies": {
    }
  }
  </code></pre>
  
  <p>Complete log:</p>
  
  <pre><code>Error: Exit code: 255. Command failed: mono /Users/&lt;user&gt;/Library/Caches/electron-builder/Squirrel.Windows/Squirrel.Windows-1.7.8/Update-Mono.exe --releasify /Users/&lt;user&gt;/developer/electron-examples/installer-and-auto-update/dist/squirrel-windows/electronquickstart-1.0.1-full.nupkg --releaseDir /Users/&lt;user&gt;/developer/electron-examples/installer-and-auto-update/dist/squirrel-windows
  2017-12-27 16:45:21&gt; Utility: Failed to extract file /Users/&lt;user&gt;/developer/electron-examples/installer-and-auto-update/dist/squirrel-windows/electronquickstart-1.0.0-full.nupkg to /Users/&lt;user&gt;/.local/share/SquirrelTemp/tempa
  wine: cannot find L"C:\\windows\\system32\\.7z.exe"
  2017-12-27 16:45:21&gt; Unhandled exception: System.AggregateException: One or more errors occurred. ---&gt; System.Exception: wine: cannot find L"C:\\windows\\system32\\.7z.exe"
    at Squirrel.Utility+&lt;ExtractZipToDirectory&gt;d__22.MoveNext () [0x000ff] in &lt;6dfa1b8045584e6384eb68e7d588f716&gt;:0 
     --- End of inner exception stack trace ---
    at System.Threading.Tasks.Task.ThrowIfExceptional (System.Boolean includeTaskCanceledExceptions) [0x00011] in &lt;6e9b92f0d119424382ef180639777acb&gt;:0 
    at System.Threading.Tasks.Task.Wait (System.Int32 millisecondsTimeout, System.Threading.CancellationToken cancellationToken) [0x00043] in &lt;6e9b92f0d119424382ef180639777acb&gt;:0 
    at System.Threading.Tasks.Task.Wait () [0x00000] in &lt;6e9b92f0d119424382ef180639777acb&gt;:0 
    at Squirrel.DeltaPackageBuilder.CreateDeltaPackage (Squirrel.ReleasePackage basePackage, Squirrel.ReleasePackage newPackage, System.String outputFile) [0x000e9] in &lt;6dfa1b8045584e6384eb68e7d588f716&gt;:0 
    at Squirrel.Update.Program.ReleasifyElectron (System.String package, System.String targetDir, System.String baseUrl) [0x00110] in &lt;6dfa1b8045584e6384eb68e7d588f716&gt;:0 
    at Squirrel.Update.Program.executeCommandLine (System.String[] args) [0x004c4] in &lt;6dfa1b8045584e6384eb68e7d588f716&gt;:0 
    at Squirrel.Update.Program.main (System.String[] args) [0x00097] in &lt;6dfa1b8045584e6384eb68e7d588f716&gt;:0 
  ---&gt; (Inner Exception #0) System.Exception: wine: cannot find L"C:\\windows\\system32\\.7z.exe"
    at Squirrel.Utility+&lt;ExtractZipToDirectory&gt;d__22.MoveNext () [0x000ff] in &lt;6dfa1b8045584e6384eb68e7d588f716&gt;:0 &lt;---
  
  System.AggregateException: One or more errors occurred. ---&gt; System.Exception: wine: cannot find L"C:\\windows\\system32\\.7z.exe"
    at Squirrel.Utility+&lt;ExtractZipToDirectory&gt;d__22.MoveNext () [0x000ff] in &lt;6dfa1b8045584e6384eb68e7d588f716&gt;:0 
     --- End of inner exception stack trace ---
    at System.Threading.Tasks.Task.ThrowIfExceptional (System.Boolean includeTaskCanceledExceptions) [0x00011] in &lt;6e9b92f0d119424382ef180639777acb&gt;:0 
    at System.Threading.Tasks.Task.Wait (System.Int32 millisecondsTimeout, System.Threading.CancellationToken cancellationToken) [0x00043] in &lt;6e9b92f0d119424382ef180639777acb&gt;:0 
    at System.Threading.Tasks.Task.Wait () [0x00000] in &lt;6e9b92f0d119424382ef180639777acb&gt;:0 
    at Squirrel.DeltaPackageBuilder.CreateDeltaPackage (Squirrel.ReleasePackage basePackage, Squirrel.ReleasePackage newPackage, System.String outputFile) [0x000e9] in &lt;6dfa1b8045584e6384eb68e7d588f716&gt;:0 
    at Squirrel.Update.Program.ReleasifyElectron (System.String package, System.String targetDir, System.String baseUrl) [0x00110] in &lt;6dfa1b8045584e6384eb68e7d588f716&gt;:0 
    at Squirrel.Update.Program.executeCommandLine (System.String[] args) [0x004c4] in &lt;6dfa1b8045584e6384eb68e7d588f716&gt;:0 
    at Squirrel.Update.Program.main (System.String[] args) [0x000bb] in &lt;6dfa1b8045584e6384eb68e7d588f716&gt;:0 
    at Squirrel.Update.Program.Main (System.String[] args) [0x00006] in &lt;6dfa1b8045584e6384eb68e7d588f716&gt;:0 
  ---&gt; (Inner Exception #0) System.Exception: wine: cannot find L"C:\\windows\\system32\\.7z.exe"
    at Squirrel.Utility+&lt;ExtractZipToDirectory&gt;d__22.MoveNext () [0x000ff] in &lt;6dfa1b8045584e6384eb68e7d588f716&gt;:0 &lt;---
  
  
  2017-12-27 16:45:13&gt; Program: Starting Squirrel Updater: --releasify /Users/&lt;user&gt;/developer/electron-examples/installer-and-auto-update/dist/squirrel-windows/electronquickstart-1.0.1-full.nupkg --releaseDir /Users/&lt;user&gt;/developer/electron-examples/installer-and-auto-update/dist/squirrel-windows
  2017-12-27 16:45:14&gt; DeltaPackageBuilder: Extracting /Users/&lt;user&gt;/developer/electron-examples/installer-and-auto-update/dist/squirrel-windows/electronquickstart-1.0.0-full.nupkg and /Users/&lt;user&gt;/developer/electron-examples/installer-and-auto-update/dist/squirrel-windows/electronquickstart-1.0.1-full.nupkg into /Users/&lt;user&gt;/.local/share/SquirrelTemp/tempb
  
  2017-12-27 16:45:21&gt; Utility: Failed to extract file /Users/&lt;user&gt;/developer/electron-examples/installer-and-auto-update/dist/squirrel-windows/electronquickstart-1.0.0-full.nupkg to /Users/&lt;user&gt;/.local/share/SquirrelTemp/tempa
  wine: cannot find L"C:\\windows\\system32\\.7z.exe"
  2017-12-27 16:45:21&gt; Unhandled exception: System.AggregateException: One or more errors occurred. ---&gt; System.Exception: wine: cannot find L"C:\\windows\\system32\\.7z.exe"
    at Squirrel.Utility+&lt;ExtractZipToDirectory&gt;d__22.MoveNext () [0x000ff] in &lt;6dfa1b8045584e6384eb68e7d588f716&gt;:0 
     --- End of inner exception stack trace ---
    at System.Threading.Tasks.Task.ThrowIfExceptional (System.Boolean includeTaskCanceledExceptions) [0x00011] in &lt;6e9b92f0d119424382ef180639777acb&gt;:0 
    at System.Threading.Tasks.Task.Wait (System.Int32 millisecondsTimeout, System.Threading.CancellationToken cancellationToken) [0x00043] in &lt;6e9b92f0d119424382ef180639777acb&gt;:0 
    at System.Threading.Tasks.Task.Wait () [0x00000] in &lt;6e9b92f0d119424382ef180639777acb&gt;:0 
    at Squirrel.DeltaPackageBuilder.CreateDeltaPackage (Squirrel.ReleasePackage basePackage, Squirrel.ReleasePackage newPackage, System.String outputFile) [0x000e9] in &lt;6dfa1b8045584e6384eb68e7d588f716&gt;:0 
    at Squirrel.Update.Program.ReleasifyElectron (System.String package, System.String targetDir, System.String baseUrl) [0x00110] in &lt;6dfa1b8045584e6384eb68e7d588f716&gt;:0 
    at Squirrel.Update.Program.executeCommandLine (System.String[] args) [0x004c4] in &lt;6dfa1b8045584e6384eb68e7d588f716&gt;:0 
    at Squirrel.Update.Program.main (System.String[] args) [0x00097] in &lt;6dfa1b8045584e6384eb68e7d588f716&gt;:0 
  ---&gt; (Inner Exception #0) System.Exception: wine: cannot find L"C:\\windows\\system32\\.7z.exe"
    at Squirrel.Utility+&lt;ExtractZipToDirectory&gt;d__22.MoveNext () [0x000ff] in &lt;6dfa1b8045584e6384eb68e7d588f716&gt;:0 &lt;---
  
  System.AggregateException: One or more errors occurred. ---&gt; System.Exception: wine: cannot find L"C:\\windows\\system32\\.7z.exe"
    at Squirrel.Utility+&lt;ExtractZipToDirectory&gt;d__22.MoveNext () [0x000ff] in &lt;6dfa1b8045584e6384eb68e7d588f716&gt;:0 
     --- End of inner exception stack trace ---
    at System.Threading.Tasks.Task.ThrowIfExceptional (System.Boolean includeTaskCanceledExceptions) [0x00011] in &lt;6e9b92f0d119424382ef180639777acb&gt;:0 
    at System.Threading.Tasks.Task.Wait (System.Int32 millisecondsTimeout, System.Threading.CancellationToken cancellationToken) [0x00043] in &lt;6e9b92f0d119424382ef180639777acb&gt;:0 
    at System.Threading.Tasks.Task.Wait () [0x00000] in &lt;6e9b92f0d119424382ef180639777acb&gt;:0 
    at Squirrel.DeltaPackageBuilder.CreateDeltaPackage (Squirrel.ReleasePackage basePackage, Squirrel.ReleasePackage newPackage, System.String outputFile) [0x000e9] in &lt;6dfa1b8045584e6384eb68e7d588f716&gt;:0 
    at Squirrel.Update.Program.ReleasifyElectron (System.String package, System.String targetDir, System.String baseUrl) [0x00110] in &lt;6dfa1b8045584e6384eb68e7d588f716&gt;:0 
    at Squirrel.Update.Program.executeCommandLine (System.String[] args) [0x004c4] in &lt;6dfa1b8045584e6384eb68e7d588f716&gt;:0 
    at Squirrel.Update.Program.main (System.String[] args) [0x000bb] in &lt;6dfa1b8045584e6384eb68e7d588f716&gt;:0 
    at Squirrel.Update.Program.Main (System.String[] args) [0x00006] in &lt;6dfa1b8045584e6384eb68e7d588f716&gt;:0 
  ---&gt; (Inner Exception #0) System.Exception: wine: cannot find L"C:\\windows\\system32\\.7z.exe"
    at Squirrel.Utility+&lt;ExtractZipToDirectory&gt;d__22.MoveNext () [0x000ff] in &lt;6dfa1b8045584e6384eb68e7d588f716&gt;:0 &lt;---
  
  
      at /Users/&lt;user&gt;/developer/electron-examples/installer-and-auto-update/node_modules/builder-util/src/util.ts:109:16
      at ChildProcess.exithandler (child_process.js:279:5)
      at ChildProcess.emit (events.js:159:13)
      at maybeClose (internal/child_process.js:943:16)
      at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)
  From previous event:
      at exec (/Users/&lt;user&gt;/developer/electron-examples/installer-and-auto-update/node_modules/builder-util/src/util.ts:77:3)
      at /Users/&lt;user&gt;/developer/electron-examples/installer-and-auto-update/node_modules/electron-builder-squirrel-windows/src/squirrelPack.ts:109:24
      at Generator.next (&lt;anonymous&gt;)
  From previous event:
      at SquirrelBuilder.releasify (/Users/&lt;user&gt;/developer/electron-examples/installer-and-auto-update/node_modules/electron-builder-squirrel-windows/out/squirrelPack.js:277:11)
      at /Users/&lt;user&gt;/developer/electron-examples/installer-and-auto-update/node_modules/electron-builder-squirrel-windows/src/squirrelPack.ts:88:16
  From previous event:
      at SquirrelBuilder.buildInstaller (/Users/&lt;user&gt;/developer/electron-examples/installer-and-auto-update/node_modules/electron-builder-squirrel-windows/out/squirrelPack.js:258:11)
      at /Users/&lt;user&gt;/developer/electron-examples/installer-and-auto-update/node_modules/electron-builder-squirrel-windows/src/SquirrelWindowsTarget.ts:35:27
      at Generator.next (&lt;anonymous&gt;)
  From previous event:
      at SquirrelWindowsTarget.build (/Users/&lt;user&gt;/developer/electron-examples/installer-and-auto-update/node_modules/electron-builder-squirrel-windows/out/SquirrelWindowsTarget.js:82:11)
      at taskManager.addTask.default.map.it (/Users/&lt;user&gt;/developer/electron-examples/installer-and-auto-update/node_modules/electron-builder-lib/src/platformPackager.ts:120:85)
  From previous event:
      at WinPackager.packageInDistributableFormat (/Users/&lt;user&gt;/developer/electron-examples/installer-and-auto-update/node_modules/electron-builder-lib/src/platformPackager.ts:120:41)
      at /Users/&lt;user&gt;/developer/electron-examples/installer-and-auto-update/node_modules/electron-builder-lib/src/platformPackager.ts:116:10
      at Generator.next (&lt;anonymous&gt;)
      at runCallback (timers.js:800:20)
      at tryOnImmediate (timers.js:762:5)
      at processImmediate [as _immediateCallback] (timers.js:733:5)
  From previous event:
      at WinPackager.pack (/Users/&lt;user&gt;/developer/electron-examples/installer-and-auto-update/node_modules/electron-builder-lib/out/platformPackager.js:195:11)
      at /Users/&lt;user&gt;/developer/electron-examples/installer-and-auto-update/node_modules/electron-builder-lib/src/packager.ts:345:24
      at Generator.next (&lt;anonymous&gt;)
      at xfs.stat (/Users/&lt;user&gt;/developer/electron-examples/installer-and-auto-update/node_modules/fs-extra-p/node_modules/fs-extra/lib/mkdirs/mkdirs.js:56:16)
      at /Users/&lt;user&gt;/developer/electron-examples/installer-and-auto-update/node_modules/graceful-fs/polyfills.js:287:18
      at FSReqWrap.oncomplete (fs.js:167:5)
  From previous event:
      at Packager.doBuild (/Users/&lt;user&gt;/developer/electron-examples/installer-and-auto-update/node_modules/electron-builder-lib/out/packager.js:407:11)
      at /Users/&lt;user&gt;/developer/electron-examples/installer-and-auto-update/node_modules/electron-builder-lib/src/packager.ts:289:52
  From previous event:
      at Packager._build (/Users/&lt;user&gt;/developer/electron-examples/installer-and-auto-update/node_modules/electron-builder-lib/out/packager.js:351:11)
      at /Users/&lt;user&gt;/developer/electron-examples/installer-and-auto-update/node_modules/electron-builder-lib/src/packager.ts:259:23
      at Generator.next (&lt;anonymous&gt;)
      at runCallback (timers.js:800:20)
      at tryOnImmediate (timers.js:762:5)
      at processImmediate [as _immediateCallback] (timers.js:733:5)
  From previous event:
      at Packager.build (/Users/&lt;user&gt;/developer/electron-examples/installer-and-auto-update/node_modules/electron-builder-lib/out/packager.js:311:11)
      at /Users/&lt;user&gt;/developer/electron-examples/installer-and-auto-update/node_modules/electron-builder/src/builder.ts:287:40
      at Generator.next (&lt;anonymous&gt;)
  From previous event:
      at _build (/Users/&lt;user&gt;/developer/electron-examples/installer-and-auto-update/node_modules/electron-builder/out/builder.js:61:21)
      at build (/Users/&lt;user&gt;/developer/electron-examples/installer-and-auto-update/node_modules/electron-builder/src/builder.ts:257:10)
      at then (/Users/&lt;user&gt;/developer/electron-examples/installer-and-auto-update/node_modules/electron-builder/src/cli/cli.ts:49:4)
      at runCallback (timers.js:800:20)
      at tryOnImmediate (timers.js:762:5)
      at processImmediate [as _immediateCallback] (timers.js:733:5)
  From previous event:
      at Object.args [as handler] (/Users/&lt;user&gt;/developer/electron-examples/installer-and-auto-update/node_modules/electron-builder/src/cli/cli.ts:49:4)
      at Object.runCommand (/Users/&lt;user&gt;/developer/electron-examples/installer-and-auto-update/node_modules/yargs/lib/command.js:228:22)
      at Object.parseArgs [as _parseArgs] (/Users/&lt;user&gt;/developer/electron-examples/installer-and-auto-update/node_modules/yargs/yargs.js:1041:24)
      at Object.get [as argv] (/Users/&lt;user&gt;/developer/electron-examples/installer-and-auto-update/node_modules/yargs/yargs.js:957:21)
      at Object.&lt;anonymous&gt; (/Users/&lt;user&gt;/developer/electron-examples/installer-and-auto-update/node_modules/electron-builder/src/cli/cli.ts:43:15)
      at Module._compile (module.js:641:30)
      at Object.Module._extensions..js (module.js:652:10)
      at Module.load (module.js:560:32)
      at tryModuleLoad (module.js:503:12)
      at Function.Module._load (module.js:495:3)
      at Function.Module.runMain (module.js:682:10)
      at startup (bootstrap_node.js:191:16)
      at bootstrap_node.js:613:3
  error Command failed with exit code 1.
  info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
  </code></pre>