I want to use RunProgram to run an executable like notepad.exe through cmd.exe.
The below will return the correct directory but when I add another command to the options list "notepad.exe" I get an error that the system cannot find the path specified.
cmd1 = "/k cd /d " || "C:\Windows\System32";
RP = RunProgram(
Executable( "CMD.EXE"),
Options( {cmd1} ),
ReadFunction("text")
);I have also seen this error a few times and don't fully understand what it is saying. How can this be remedied?
The external program was producing output when the RunProgram object was destroyed.
Use a JSL variable to hold the RunProgram object.
Optionally, send messages to the variable to manage the object's lifetime.