Skip to content
/ exe_tool Public

Makes a non-console Windows application out of an executable file. By patching method

Notifications You must be signed in to change notification settings

ilopX/exe_tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hide console dart native

Makes a non-console Windows application out of an executable file. By patching method

The reason for creating this repository is described here: halildurmus/win32#127

Install

dev_dependencies:
  dart_exe:
    git:
      url: https://github.com/ilopX/exe_tool

Run

dart compile exe app.dart
pub run dart_exe subsystem=gui showInfo d:\app.exe

Output:

ExeFile: d:\app.exe + changed(GUI)
0x3c: PE address: 0x118
0x11c: MachineType: 0x8664 (x64)
0x130: PEType: 0x20b (PE+)
0x174: Subsystem: 0x2 (GUI)

Example

import 'dart:io';

import 'package:dart_exe/dart_exe.dart';

void main(List<String> arguments) async {
  final exe = ExeFile(r'd:\app.exe');
  try {
    final pe = exe.openPE();

    pe.subsystem = Subsystem.GUI;

    print('Open: ${exe.fileName}');
    print('PE address: 0x${pe.address.pe.toRadixString(16)}');
    print('${pe.machine}');
    print('${pe.peType}');

    print('${pe.subsystem}');
  } catch (e) {
    stderr.writeln(e);
  }
  finally {
    exe.close();
  }
}

DartFlutter runner

About

Makes a non-console Windows application out of an executable file. By patching method

Resources

Stars

Watchers

Forks

Languages