user1580348
user1580348

Reputation: 6051

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

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).

Upvotes: 0

Views: 614

Answers (1)

Jeaninez - MSFT
Jeaninez - MSFT

Reputation: 4017

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

Upvotes: 1

Related Questions