Reputation: 431
I am trying to write a icon changing program like resource hacker. I am able to change icons of windows programs but not console programs and I think thats quite obvious. So I want to write a code in my program that will check if the argument exe file is a console program or windows program before it tries to change the icons.
So how do I check if an exe file is a console program or windows program. I am writing program in C using visual studio.
Upvotes: 1
Views: 1451
Reputation: 4366
The Subsystem
value inside the Portable Executable header of the file will give you the info:
WINDOWS_CUI 3 Runs in the Windows character subsystem (a console app)
Upvotes: 2