Compiles a Windows .bat/.cmd launcher into a real .exe from inside DSH: renders an icon from a built-in bitmap font, emits a C# wrapper that runs the batch file next to it, compiles with csc.exe (or dotnet build), and can write Start Menu / Desktop shortcuts.
Install
# from npm (prebuilt)
dsh plugin --profile web add dsh-bat2exe
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:nirvanaslash/dsh-bat2exe
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
Turn a Windows .bat / .cmd launcher into a real .exe — from inside DeepSeek Harness.
The EXE is a thin shell: it locates the batch file next to itself and hands the
whole job to cmd.exe. The launcher logic stays editable text, no tool path is baked
into the binary, and upgrading whatever the batch file calls needs no recompilation.
Install
dsh plugin --profile web add dsh-bat2exe
Restart DSH, then ask the agent to build a launcher — or call the tool directly.
Tools
bat2exe_build
| Parameter | Meaning |
|---|---|
bat |
required — path to the .bat/.cmd file (absolute, or relative to the working directory) |
name |
output executable name; defaults to the batch name with .exe |
iconText |
up to four characters drawn on a generated icon |
iconTextColour |
icon text colour as #rrggbb |
icon |
use an existing .ico instead of rendering one |
startMenuShortcut |
also write a Start Menu shortcut |
desktopShortcut |
also write a Desktop shortcut |
The build runs four steps, all local and offline:
- Icon — renders a rounded-square plate with a diagonal gradient and the given text, using a built-in 5×7 bitmap font, then packs it as a 256×256 ICO. No image library, no external tool.
- C# shell — emits a wrapper whose only job is to run the batch file from its own directory, forwarding all arguments and preserving the exit code.
- Compile —
csc.exefrom the .NET Framework (falling back todotnet buildwhen only the .NET SDK is present), with the icon embedded as a resource. - Shortcuts — optional
.lnkfiles, written throughWScript.Shell.
bat2exe_probe
Reports the local toolchain — C# compiler path, .NET SDK presence, PowerShell, and the resolved defaults — so a failure can be diagnosed before a build is attempted.
Settings
bat2exe registers a settings namespace, so defaults are editable in
Settings → Plugins rather than by hand-editing a profile patch:
| Key | Default | Meaning |
|---|---|---|
iconText |
BAT |
text drawn on a generated icon |
iconFrom / iconTo |
#12204a / #4a6cf7 |
gradient start / end |
workDir |
.bat2exe |
where *.cs, *.ico and other by-products go |
startMenuShortcut |
false |
default for the Start Menu shortcut |
desktopShortcut |
false |
default for the Desktop shortcut |
Per-call tool arguments always win over these defaults.
Requirements
- Windows. The pipeline compiles a Windows PE and writes
.lnkfiles. - A C# compiler: .NET Framework 4.x (
csc.exe, present on stock Windows) or the .NET SDK. - PowerShell for shortcut creation only (
pwshpreferred, Windows PowerShell accepted).
bat2exe_probe reports exactly which of these were found.
What gets written
Everything lives next to the batch file, so a launcher folder is self-contained:
DSH-Web.bat <- your launcher (unchanged)
DSH-Web.exe <- the compiled shell
.bat2exe/
DSH-Web.ico <- generated (or your supplied) icon
DSH-Web.cs <- the emitted C# source, kept for inspection
License
MIT
Links
More in this category
yjh051108/dsh-routing-suite★ 6991
One repository, three parts: a runtime injector for DSH plugin packages (inject, hot-reload, unload, promote a dev staging tool to the front, route self-heal, plus a settings-page plugin manager that lists, unloads and drags folders in to internalize), a task-aware reasoning-mode router agent preset (router-standard / router-spec / router-react), and a graded two-level task protocol whose six tools (commit_star, lock_stage, revise_do, edit_plan, mark_task, redteam_verdict) pin task state to disk. The injector implementation ships in-tree, so the install carries its own behaviour rather than a dependency list.
strukto-ai/mirage#dsh★ 3715
Swaps the filesystem and bash providers for a mirage virtual workspace: file tools and shell commands run over mounted resources (RAM, S3, Redis, Slack, Gmail, Notion, Postgres) instead of the host disk, with per-mount read/write/exec modes, per-command sandbox routing (monty, pyodide, quickjs in process; docker, e2b, daytona remote), and installed CLIs (git, gh, slack, linear, ntn, gws, or one you register) as head words in the virtual terminal.
first-fluke/oh-my-agent#dsh★ 1352
Runs project OMA checks before and after tool execution and when a turn tries to finish. Installs its OMA CLI dependency and initializes unconfigured projects on first use. Requires Node.js 22+; initial setup needs network access and project write access.
hust-open-atom-club/oh-dsh★ 323
Community distribution: TUI, desktop, and Web UI as one bundle with layered installation.
MichengAI/dsh-skills-manager★ 294
Manages local DeepSeek Harness skills in Settings and shows shared Agent skills as read-only.
Fishquito7/dsh-skill-mcp-panel★ 223
Manages DSH skills and MCP servers from the web settings: skill cards with hot enable/disable, workspace scopes, groups, batch migration and drag-and-drop import, plus stdio/HTTP MCP CRUD with connection tests, secret redaction and the unified dsh-panel CLI.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.