
Security News
Meet Socket at Black Hat Europe and BSides London 2025
Socket is heading to London! Stop by our booth or schedule a meeting to see what we've been working on.
cross-spawn-windows-exe
Advanced tools
cross-spawn-windows-exeCross-platform support for running Windows executables via Node.js.
Utilizes @malept/cross-spawn-promise (and by
extension, cross-spawn) to execute Windows executables regardless
of platform.
For all platforms, Node 10 or above is required.
On non-Windows, non-WSL host systems, the following dependencies are required:
Using the cross-spawn-windows-exe API is similar in terms of function signature to spawn in
@malept/cross-spawn-promise.
// Note: top-level await exists in Node >= 14.8.0. In earlier versions of Node, please wrap in an
// async function.
const { spawnDotNet } = require("cross-spawn-windows-exe");
await spawnDotNet("./hellodotnet.exe", ["--arg1"]);
// Note: top-level await exists in Node >= 14.8.0. In earlier versions of Node, please wrap in an
// async function.
const { spawnExe } = require("cross-spawn-windows-exe");
await spawnExe("./hellowindows.exe", ["--arg1"]);
Executables generally can't handle UNIX-style paths that Windows Subsystem for Linux (WSL) passes
in, since it's a Linux environment. This module provides a function to convert those paths from
UNIX-style to Windows-style (via wslpath, which should be installed by default on every WSL
distribution), if the host system is determined to be WSL. For non-WSL environments, this is a
no-op.
// Note: top-level await exists in Node >= 14.8.0. In earlier versions of Node, please wrap in an
// async function.
const { normalizePath, spawnExe } = require("cross-spawn-windows-exe");
const normalizedPath = await normalizePath("/tmp/foo");
await spawnExe("./openfile.exe", ["--filename", normalizedPath]);
This module is licensed under the Apache License, version 2.0.
See LICENSE for details.
FAQs
Cross-platform support for running Windows executables
The npm package cross-spawn-windows-exe receives a total of 119,801 weekly downloads. As such, cross-spawn-windows-exe popularity was classified as popular.
We found that cross-spawn-windows-exe demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket is heading to London! Stop by our booth or schedule a meeting to see what we've been working on.

Security News
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.