Runs a program and waits for it to close before continuing.
The name of the program to run.
Optional working directory for the program.
Optional flag to control how the program's window is shown.
A promise that resolves to the exit code of the program.
import { RunWait } from '@ahmic/autoit-js';const exitCode = await RunWait('notepad.exe');console.log(exitCode); // Output: 0 Copy
import { RunWait } from '@ahmic/autoit-js';const exitCode = await RunWait('notepad.exe');console.log(exitCode); // Output: 0
https://www.autoitscript.com/autoit3/docs/functions/RunWait.htm
Runs a program and waits for it to close before continuing.