WSL Bash Windows executable files

Execute Windows Executables from WSL Bash

A memo about how to execute Windows executable files/processes from WSL Bash. In WSL, it's possible to launch Windows applications. For some software, you may get errors like 'script file not found.' or 'The system cannot find the path specified.'

Shou Arisaka
1 min read
Nov 12, 2025

A memo about how to execute Windows executable files/processes from WSL Bash.

Normally, in WSL, it’s possible to launch Windows applications. It became possible.

$ explorer.exe .
$ calc.exe

However, for some software like AutoHotkey, errors may occur.

script file not found.

After thinking about a solution, I found that the following command works:

cmd.exe /C "C:\Program Files\AutoHotkey\AutoHotkeyU64.exe" C:/pg/autohotkey/your_script.ahk

If you get the following error, you’re probably writing something like /mnt/ where you should be writing C:.

The system cannot find the path specified.

Also, with this code, the command line won’t progress even after the executed file finishes. This means that when using it in shell scripts, you need to separate the files.

shellScript.sh

. cmd.sh &

cmd.sh

cmd.exe /C "C:\Program Files\AutoHotkey\AutoHotkeyU64.exe" C:/pg/autohotkey/per5_printScreen.ahk

By using &, you execute a separate shell script as a background process.

That’s all.

Share this article

Shou Arisaka Nov 12, 2025

🔗 Copy Links