Hi,

New to XP so still learning. I can see how to change a shortcut's icon (through properties). Is there a way to associate an icon with the application .exe itself?

I'm mostly interested in having the icon of my choice show on the taskbar and in the window corner, but also everywhere else really.

Thanks

Dani AI

Generated

Short answer tied to the replies from this thread: is right that changing a shortcut icon is the easiest visible fix; and were pointing at the real cause — the icon shown on the title bar and taskbar is the icon the program provides at runtime — so changing the shortcut alone won't always affect those places. Below are practical alternatives and important cautions.

If you can rebuild the program (or have the source), set the icon in the resources and/or set the window icon at runtime. The Win32 approach is straightforward; for example:

SendMessage(hwnd, WM_SETICON, ICON_SMALL,
            (LPARAM)LoadImage(hInstance, MAKEINTRESOURCE(IDI_MYICON),
                              IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR));
SendMessage(hwnd, WM_SETICON, ICON_BIG, 
            (LPARAM)LoadImage(hInstance, MAKEINTRESOURCE(IDI_MYICON),
                              IMAGE_ICON, 32, 32, LR_DEFAULTCOLOR));

Make sure the .ico includes 16x16 and 32x32 flavors so XP draws crisp icons in both the title bar and taskbar.

If you cannot recompile, options are:

  • Change how Explorer displays .exe files by editing the DefaultIcon value under HKEY_CLASSES_ROOT\exefile\DefaultIcon (export the key first). This changes what Explorer shows for EXE files but does not reliably change an application's running window/taskbar icon.
  • Use a resource-editor-style tool to replace the icon resource inside the EXE (requires stopping the app, admin rights). This edits the binary itself and can break digital signatures or trigger AV warnings — back up the original file.

After any change, refresh Windows' icon cache (log off or kill explorer.exe, delete
"%USERPROFILE%\Local Settings\Application Data\IconCache.db" on XP, then restart Explorer) to see updates.

Cautions: always keep backups, expect to need admin rights, and be aware editing a shipped EXE may violate licensing or corrupt signatures. If the goal is only the desktop/taskbar appearance for your own use, a custom launcher/shortcut that carries your chosen icon is usually the simplest, safest solution.

Recommended Answers

All 4 Replies

Member Avatar for Member #127113

No you can't change Application Icons. Reason is the Application Icons are Inbuilt in .exe when its written so its unable to change .exe icons.

Thanks.

Member Avatar for Member #127113

:)

some times you can change an exe icon . it's not immpossible .

some programs can do it for you . for example " Resource Hacker " or " PE Explorer " is the name of witch program that can edit .exe , .dll & ...

or some programs call "EXE Icon Changer"

between these program i know "Resource hacker " is free .

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.