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.

Icon not being added to .exe file

See original GitHub issue

Hi,

I’m packaging an application with electron-packager@5.1.1 on OS X El Capitan with the following command:

electron-packager . Herostratus \
    --platform=win32 \
    --arch=x64 \
    --version=0.34.2 \  
        --icon="assets/icon.ico" \
    --overwrite \
    --out=release/

The icon is added to the top left corner of the window and appears in the bottom bar on Windows 10, however I still see the default Electron icon when opening the directory with the file explorer.

Is there anything else I have to add to get the icon on the .exe file?

I also tested generating the package directly on Windows 10 in case the issue was wine-related but the results were the same.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
jviotticommented, Nov 12, 2015

I did two things and one of them solved the issue, but not sure which one:

  • I had a 1024x1024 *.png icon that I passed to BrowserWindow. I resized to 256x256.
  • Pass --asar to electron-packager.
1reaction
ghostcommented, Mar 30, 2019

i tried with --icon=“./assets/icon.ico” this works for me

Read more comments on GitHub >

github_iconTop Results From Across the Web

.exe file lost its original icon - Microsoft Community
Although it's possible, but pretty unlikely, that the exe file was corrupted, a more likely cause of this symptom is that the icon...
Read more >
No error while adding icon to EXE file with Pyinstaller Spec ...
Things to do: Just rename the file, File explorer will update the icon and you will sure the new icon has set or...
Read more >
How to Change the Icon of any EXE File in Windows 10 & 11
1. Windows icons are in the ICO format, so you'll need to have an icon file ending with .ICO. Many free icon sites...
Read more >
How to change the Icon of an exe file in Visual Studio 2019 ...
In this tutorial I will show you how you can change the default Icon of your visual studio 2019 project (for the exe...
Read more >
windows 7 - Application icons are gone - Super User
3 Answers 3 · Rebuild the icon cache: Automatically: · Check for custom icon-handlers: Open a command-prompt ( cmd.exe ) · Check for...
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