This a simple binary passthrough that hides the console window when a SEA (Single Executable Application) is opened. Useful when you want a simple nodejs SEA to run on the background and don't show any console windows. It also passes along every console argument through.
- Download the latest release (
nodejs-sea-hide-passthrough.exeandconfig.ini). - Place both files in the same directory as your Node.js SEA (or any other executable you want to hide).
- Edit
config.iniand setTarget=YOUR_APP_NAME.exe. - Run
nodejs-sea-hide-passthrough.exe. It will launch your app in a hidden window and pass all arguments to it.
The behavior is controlled by config.ini:
[Settings]
; The name of the Single Executable Application (SEA) or binary to launch.
Target=helo.exeIf you haven't created a Node.js SEA yet, here is a quick guide based on the official Node.js documentation.
Create your JavaScript file (e.g., hello.js) and a configuration file sea-config.json:
hello.js
console.log(`Hello, ${process.argv[2]}!`);sea-config.json
{
"main": "hello.js",
"output": "sea-prep.blob"
}Run the following command to generate the sea-prep.blob:
node --experimental-sea-config sea-config.jsonCopy the node executable to your project folder.
Windows (PowerShell):
node -e "require('fs').copyFileSync(process.execPath, 'hello.exe')"Linux/macOS:
cp $(command -v node) helloUse postject to inject the blob into the executable.
npx postject hello.exe NODE_SEA_BLOB sea-prep.blob --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2(On macOS, add --macho-segment-name NODE_SEA)
Now you have a standalone hello.exe! You can use this nodejs-sea-hide-passthrough tool to wrap it and hide the console window.
Distributed under MIT License. See license.md for more information.