1

Electron remains with this top menu when bundled for Windows 10 I'm using:

enter image description here

To package my project I am using the following package.json command:

npm run dist

Here is my package.json:

{
  "name": "your-app",
  "version": "0.1.0",
  "main": "main.js",
  "scripts": {
    "dist": "electron-builder",
    "pack": "electron-builder --dir"
  },
  "devDependencies": {
    "electron": "^6.0.12",
    "electron-builder": "^21.2.0",
    "electron-packager": "^14.0.6"
  },
  "build": {
    "target": "NSIS",
    "appId": "your.id",
    "mac": {
      "category": "your.app.category.type"
    }
  }
}

Here is the way I am creating the window:

const { app, BrowserWindow } = require('electron')

function createWindow () {
  let win = new BrowserWindow({
    width: 800,
    height: 600,
    webPreferences: {
      nodeIntegration: true
    }
  })
  win.loadFile('global.html')
}

app.on('ready', createWindow)

When I click on the .exe file after compiling my project, this top menu still appears in the program.

How can I get this top menu off when my project is packaged for .exe?

Isaac
  • 150
  • 1
  • 1
  • 12
  • Does this answer your question? [Remove menubar from Electron app](https://stackoverflow.com/questions/39091964/remove-menubar-from-electron-app) – no ai please Apr 25 '21 at 00:42

1 Answers1

1

use win.removeMenu() function to remove the menu.

Refer this answer.

Sudhakar Ramasamy
  • 1,736
  • 1
  • 8
  • 19