isValidExecutable property

bool get isValidExecutable

Returns true if file is a valid Windows executable in GUI or Console Subsystem.

Implementation

bool get isValidExecutable {
  try {
    var info = _seekToWindowsSubsystemImpl();
    var pos = info['windowsSubsystemOffset'];
    return pos != null && pos > 128;
  } catch (_) {
    return false;
  }
}