John Shedletsky
John Shedletsky

Reputation: 7168

Change the taskbar icon of another process in Windows

I'm got 2 applications running in Windows 7. The first application is a C++ bootstrapper that launches the second application. I want to change the second application's icon in the Windows taskbar (the bar at the bottom of the screen) programmatically from the first application at runtime.

Is this possible?

Is there a way to create the second process so that it shares a common taskbar icon with the first one?

I'm trying to create a standalone redistributable for ROBLOX games (the second app here is the game player and I'd like to load a game-specific icon, otherwise the user experience will be confusing)

Upvotes: 3

Views: 1369

Answers (1)

Remy Lebeau
Remy Lebeau

Reputation: 597146

What you are asking for is generally not possible. Only the process that owns a Taskbar button can manipulate it. A process cannot manipulate another process's Taskbar buttons. Your bootstrapper will likely need to inject code, such as with CreateRemoteThread(), that runs inside of the second process

Upvotes: 1

Related Questions