Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Old icons cached? - New icons are not consistently used across #2062

Closed
distributev opened this issue Sep 12, 2017 · 11 comments
Closed

Old icons cached? - New icons are not consistently used across #2062

distributev opened this issue Sep 12, 2017 · 11 comments
Labels

Comments

@distributev
Copy link

  • Version: "electron-builder": "^19.27.1",
  • Target: build -w --ia32 (Windows 10 64bit)

It seems the same (or similar) issue was raised here - #840

I changed all the icons with new icons I regenerate the exe file 3 or 4 times but the old icon (even if meanwhile I re-generated 3 or 4 times with 4 different icons) still show next the my App.exe in Windows Explorer. When I double click and launch the app the correct / new icon is showing in task manager.

Here is a screen-shot

wrong-icon

@develar
Copy link
Member

develar commented Sep 13, 2017

Do you use installer to install app and launch or run it directly?

Just restart Windows.

@distributev
Copy link
Author

I run the app directly. I have no intention to create an installer I want to create a self contained app.

I restarted Windows and the behavior is the same I see the old icon near the App.exe and the new icon when the app is started and it's in the task-bar.

Do you have an idea why the old icon is still being used?

@develar
Copy link
Member

develar commented Sep 15, 2017

Consider to use portable target if you want self-contained app.

@distributev
Copy link
Author

I already doing that - this is an extract from package.json

"win": {
"artifactName": "${productName}.${ext}",
"target": [
"portable"
]
}

Can this be related with the cached icons?

@develar
Copy link
Member

develar commented Sep 18, 2017

Do you mean that on desktop do you see old icon of portable executable?

@distributev
Copy link
Author

Yes the PortableApp.exe shows the old icon in Windows Explorer.

If I double click and launch the new (correct) icon is coming in Taskbar.

@develar develar added the nsis label Sep 18, 2017
@develar
Copy link
Member

develar commented Sep 18, 2017

Possible Solution — portable should refresh desktop on launch.

@distributev
Copy link
Author

I don't understand what you want to say here. I launched the exe many times and Windows Explorer icon does not change (refresh) - the old icon will remain. Windows was restarted also.

@dharders
Copy link

dharders commented Oct 3, 2017

Ahhh the old windows icon cache issue. I've dealt with this before. From memory I used a combination of these hacks:

http://www.winhelponline.com/blog/refresh-icon-cache-windows-7-quickly/
http://nsis.sourceforge.net/Refresh_shell_icons
https://stackoverflow.com/questions/3243317/make-windows-refresh-icon-cache

I agree, Windows is a pain ;)

@andyb1979
Copy link

I discovered today Electron (or Windows) is caching the icon based on app ID.

In my electron app I set app ID here

app.setAppUserModelId('com.myco.myappname');

If I changed that app ID when I changed the icon, the cached icon went away

@Smileyprog
Copy link

I discovered today Electron (or Windows) is caching the icon based on app ID.

In my electron app I set app ID here

app.setAppUserModelId('com.myco.myappname');

If I changed that app ID when I changed the icon, the cached icon went away

My hero!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants