Home > Net >  How to detect whether a file is an executable file in Windows?
How to detect whether a file is an executable file in Windows?

Time:11-29

Is it correct to assume that executable files do not show an "Open-With" submenu in the Windows right-click File Explorer context menu?

Is there a Winapi function to detect whether a file is an EXECUTABLE FILE?

(I need to detect this to get the information on whether a file can show an "Open-With" submenu in the Windows right-click File Explorer context menu).

CodePudding user response:

The fact that executable files do not show an "Open-With" submenu does not mean that files do not show an "Open-With" submenu are executable files.

If you want to detect whether a file is an EXECUTABLE FILE. I suggest you could try to use GetBinaryTypeA function

  • Related