I typically have multiple cmd windows open for different purposes. To keep them straight, I set the background colors, the titles, and the window icons. I recently upgraded from Windows 7 to Windows 10, and everything still works except for the customization of the icons.
I created shortcuts for the various cmd windows, and set custom icons in the shortcut. In Windows 7, the cmd windows would inherit the icon of the shortcut used to launch it, but in Windows 10, cmd windows launched from a shortcut always show the generic application icon (not even the regular cmd icon).
Is there a way to get the old Windows 7 behavior in Windows 10?
03 Answers
What should be retained from this answer and the comments below, is that
after my remark that there is no problem in setting the icons of
CMD shortcuts when using icons from C:\Windows\System32\shell32.dll,
the poster has moved his icons DLL to C:\Windows\System32 and suddenly
it all started working well, exactly the same as it did before in Windows 7.
Apparently there is some new obscure restriction in Windows 10, surely in the
name of security, that for CMD windows only icon sources inC:\Windows\System32 are acceptable.
Old answer (relating to .bat files)
Windows 10 will not let one change the displayed icon for a .bat file that
is stored on the desktop. There is no explanation as to why this is so.
The solution is to store the file somewhere else, to create a desktop shortcut to it and then to change the icon on that shortcut.
There is another weird problem in that the changed icon is not immediately displayed, which gives the impression that the change did not work. To fix this, type F5 while the focus is on the desktop, and this will refresh the desktop display.
In case when the icon display is totally broken, you could try toRebuild a Broken Icon Cacheafter setting your icons, then reboot.
9This should be the default behavior. But I'm running into this exact issue with my new laptop (2017 Razer Blade). However, my desktop behaves as you would expect: icons set in the shortcut are reflected in the PowerShell window.
I first noticed this when my Ubuntu (Windows Linux Subsystem) window didn't have the Ubuntu icon on my laptop while it did on my desktop.
After some experimenting, I've discovered that:
- This applies to CMD shortcuts as well.
- Icons embedded in .exes and .dll work fine. It's just .ico files that don't work for some reason.
- It doesn't appear to be account dependent. I made a new local account on the laptop and ran into the same issue.
Sorry that this isn't an exact answer, but maybe it will help lead to a comprehensive solution.
3Try to use different icon file type, such as .ico, .icl, .exe, .dll. Also, make sure the file(.ico) is not beyond the maximum size of 256x256 pixels.
Icons:
Besides, make sure system is fully patched with Windows Update/Hotfix.
1