Here are 10 advanced ExeRunner tricks every power user should know:
-
Run with custom working directory — Launch executables from a specific directory so relative paths and config files resolve correctly (use the “run from file directory” option or set the workingDirectory in your run command).
-
Pass complex arguments via response files — When command-line argument length or quoting gets messy, put arguments in a response file and pass its path to the executable.
-
Use environment-variable templates — Inject environment variables into the run command (e.g., %MY_VAR% on Windows) for per-run configuration without changing binaries.
-
Auto-restart failed runs — Wrap ExeRunner calls in a small script or use task retry features (if available) to automatically retry on transient exit codes.
-
Capture and forward exit codes to CI — Ensure ExeRunner returns the child process exit code to CI systems (configure “fail build on test failure” or propagate %ERRORLEVEL%).
-
Run non‑Windows EXEs via compatibility layers — On macOS/Linux, configure ExeRunner (or its VS Code extension) to invoke wine or Proton so .exe runs work cross‑platform.
-
Sandbox runs with Windows Sandbox or VMs — For risky or untrusted EXEs, launch them inside Windows Sandbox, Hyper-V/VMware, or use lightweight containers to avoid system changes.
-
Combine with WiX Burn bundles — Use ExeRunner to execute MSI/EXE payloads inside WiX Burn chains; pass per-package args and honor Burn’s logging conventions.
-
Integrate with editor/IDE shortcuts — Map ExeRunner to an editor command (e.g., VS Code keybinding or task) to run the current .exe with one keystroke and show output in the integrated terminal.
-
Log and timestamp output for debugging — Pipe stdout/stderr to timestamped log files, rotate them, and include verbose flags so you can trace failures across runs.
Leave a Reply