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.

Windows installer create shortcut - question

See original GitHub issue
  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project follows, as appropriate.
  • I have searched the issue tracker for an issue that matches the one I want to file, without success.

Please describe your issue:

I am stumped on trying to get the installer created using electron-forge make to create the windows shortcuts. Can I please verify I should just be adding the following to my main.js:

if(require(‘electron-squirrel-startup’)) app.quit();

I have seen another couple of older issues where config for win32metadata was added under electronPackagerConfig in package.json. This doesn’t seem to make a difference.

I am getting a javascript error when running the installer. I cannot copy the text from the alert so have attached snippet. screenshot1

I am sorry if this is not the right place. I can see electron-forge uses windows-installer which in turn uses electron-squirrel-startup. electron-squirrel-startup seems dead. I can close and move this to appropriate place if needed.

Console output when you run electron-forge with the environment variable DEBUG=electron-forge:*. (Instructions on how to do so here). Please include the stack trace if one exists.

I don't have console output since this happens when running the installer.

What command line arguments are you passing?

None. I am just running installer created from electron-forge make.

What does your config.forge data in package.json look like?

"config": {
    "forge": {
      "make_targets": {
        "win32": [
          "squirrel"
        ],
        "darwin": [
          "zip"
        ],
        "linux": [
          "deb",
          "rpm"
        ]
      },
      "electronPackagerConfig": {
        "packageManager": "npm",
        "dir": "./src",
        "ignore": [
          ".idea",
          ".gitignore"
        ]
      },
      "electronWinstallerConfig": {
        "name": "dymamic_soundboard"
      },
      "electronInstallerDebian": {},
      "electronInstallerRedhat": {},
      "github_repository": {
        "owner": "",
        "name": ""
      },
      "windowsStoreConfig": {
        "packageName": "",
        "name": "dymamicsoundboard"
      }
    }
  }

Please provide either a failing minimal testcase (with a link to the code) or detailed steps to reproduce your problem. Using electron-forge init is a good starting point, if that is not the source of your problem.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
GitFlipcommented, May 10, 2018

@cballantyne Did you ever get this issue solved? Looking at this comment: https://github.com/electron/electron/issues/8862#issuecomment-294303518 prompted us to update our code:

if (require('electron-squirrel-startup'))
{ 
    app.quit();
}

And we updated to:

if (require('electron-squirrel-startup'))
{ 
    app.exit();
}

The issue got resolved doing this, but the shortcut is now not created.

0reactions
joshuapintercommented, Mar 28, 2019

I can confirm, changing:

if ( require( "electron-squirrel-startup" ) ) app.quit();

to:

if ( require( "electron-squirrel-startup" ) ) app.exit();

and the issue went away.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Visual Studio C# installer does not create a shortcut in desktop
Visual Studio C# installer does not create a shortcut in desktop ... If you have extra questions about this answer, please click "Comment"....
Read more >
Issue #489 · electron/forge - Windows installer create shortcut
I am stumped on trying to get the installer created using electron-forge make to create the windows shortcuts. Can I please verify I...
Read more >
Visual Studio Deployment Project - Create shortcut to ...
6 Answers 6 · Open FileSystem editor and go the User's Desktop folder. · Right click with the mouse and select Create New...
Read more >
Install a shortcut using a software installer? - Super User
Create a new shortcut by right clicking on a empty area of your desktop. Select New and then Shortcut. https://www.screencast.com/t/wSGzzcre. In ...
Read more >
Creating shortcuts depending on program versions - Community
Dear all, I have a question about creating program version dependent shortcuts in the Windows program menu. I am using Install Shield 2014 ......
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